-
Notifications
You must be signed in to change notification settings - Fork 87
fix: avoid doubled footer border when all rows visible #10475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid doubled footer border when all rows visible #10475
Conversation
| [part~='first-footer-row']::before { | ||
| position: absolute; | ||
| inset-inline: 0; | ||
| [part~='row'] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a but hard to figure out what change is the actual fix here due to CSS nesting usage.
Are all of these changes necessary in this PR? If not, maybe we could extract it to separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes are actually necessary. :)
The previous implementation was very hard to manage because it mixed multiple cases in the same selectors. It also kept the "focus outline" rules very far from the "borders" rules which were actually related to each other. In the new version, I'm taking a different approach:
- I keep cases separate for better clarity
- I keep the "focus outline" rules near the related "borders" rules
- I apply a top border by default and disable it where needed
- I apply bottom borders only in specific cases
This allowed the doubled footer border issue to be naturally solved by these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can actually rename it to a "refactor" if you like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@web-padawan, it might help the review if you keep in mind that the ::after pseudo element on each row & cell is for their focus outline, and the ::before pseudo on the last header row and first footer row is for the row border.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it makes more sense this way 👍
| &::after { | ||
| bottom: 0; | ||
| } | ||
| [part~='cell']::after { | ||
| bottom: 0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not combine these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|



Description
The previous implementation was very hard to manage because it mixed multiple cases in the same selectors. It also kept the "focus outline" rules very far from the "borders" rules while they were actually related to each other. This created a breeding ground for issues like doubled footer border, in particular.
In this PR, I'm refactoring the implementation to:
These changes make the doubled footer border issue go away naturally.
Follow-up to #10331
Type of change