Skip to content

Conversation

@vursen
Copy link
Contributor

@vursen vursen commented Nov 11, 2025

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:

  • keep cases separate for better clarity
  • keep the "focus outline" rules near the related "borders" rules
  • apply a top border by default and disable it where needed
  • apply bottom borders only in few specific cases

These changes make the doubled footer border issue go away naturally.

Before After
Screenshot 2025-11-12 at 9 15 19 Screenshot 2025-11-12 at 9 15 40

Follow-up to #10331

Type of change

  • Bugfix

@vursen vursen changed the title fix: avoid double border on footer when all rows visible fix: avoid doubled footer border when all rows visible Nov 12, 2025
@vursen vursen marked this pull request as ready for review November 12, 2025 05:19
@vursen vursen requested review from jouni and web-padawan November 12, 2025 05:19
[part~='first-footer-row']::before {
position: absolute;
inset-inline: 0;
[part~='row'] {
Copy link
Member

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.

Copy link
Contributor Author

@vursen vursen Nov 12, 2025

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.

Copy link
Contributor Author

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

Copy link
Member

@jouni jouni Nov 12, 2025

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.

Copy link
Member

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 👍

Comment on lines 273 to 279
&::after {
bottom: 0;
}
[part~='cell']::after {
bottom: 0;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not combine these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sonarqubecloud
Copy link

@web-padawan web-padawan merged commit 066574a into main Nov 12, 2025
9 checks passed
@web-padawan web-padawan deleted the remove-double-footer-border-when-all-rows-visible branch November 12, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants