Skip to content

refactor(theme): use relative units for icon badge sizing#1878

Merged
spliffone merged 1 commit intomainfrom
refactor/theme/icon-badge-rfs
Apr 20, 2026
Merged

refactor(theme): use relative units for icon badge sizing#1878
spliffone merged 1 commit intomainfrom
refactor/theme/icon-badge-rfs

Conversation

@dr-itz
Copy link
Copy Markdown
Contributor

@dr-itz dr-itz commented Apr 15, 2026

@dr-itz dr-itz requested review from a team as code owners April 15, 2026 12:08
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates badge styles by converting pixel-based dimensions and offsets to rem units and changing a border-radius to a percentage. The feedback recommends using the typography.px-to-rem() utility function instead of hardcoded rem values to improve maintainability and ensure consistency with the project's styling patterns.

Comment thread projects/element-theme/src/styles/bootstrap/_badges.scss
Comment thread projects/element-theme/src/styles/bootstrap/_badges.scss Outdated
Comment thread projects/element-theme/src/styles/bootstrap/_badges.scss
@spliffone
Copy link
Copy Markdown
Member

Can we fix the navbar and tabs before we merge this PR? Since it difficult to test the behaviour when we increase the font size

@dr-itz
Copy link
Copy Markdown
Contributor Author

dr-itz commented Apr 16, 2026

Can we fix the navbar and tabs before we merge this PR? Since it difficult to test the behaviour when we increase the font size

can you be more specific? We already have normal badges that are based on font-size. This is a small independent fix. There's no point in addressing anything else before this

@spliffone
Copy link
Copy Markdown
Member

Can we fix the navbar and tabs before we merge this PR? Since it difficult to test the behaviour when we increase the font size

can you be more specific? We already have normal badges that are based on font-size. This is a small independent fix. There's no point in addressing anything else before this

Yes, the si-navbar-vertical-badges or si-tabs example look incorrect:

image image image

Maybe fix first those components to judge the correct behaviour of the badges.

@dr-itz dr-itz force-pushed the refactor/theme/icon-badge-rfs branch 3 times, most recently from 303402f to 303102c Compare April 20, 2026 14:27
@dr-itz dr-itz force-pushed the refactor/theme/icon-badge-rfs branch from 303102c to 79aea02 Compare April 20, 2026 14:44
@dr-itz
Copy link
Copy Markdown
Contributor Author

dr-itz commented Apr 20, 2026

@spliffone this one is ready. vertical nav didn't even use the badge-text CSS, which it does now. vertical alignment for navbar, tabs, etc. is fixed. Positioning in those needs addressing when fixing those components

Copy link
Copy Markdown
Member

@spliffone spliffone left a comment

Choose a reason for hiding this comment

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

Incredible work, thank you for fixing the positioning too

@spliffone spliffone added this pull request to the merge queue Apr 20, 2026
Merged via the queue into main with commit b2a682f Apr 20, 2026
11 checks passed
@spliffone spliffone deleted the refactor/theme/icon-badge-rfs branch April 20, 2026 18:53
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.

2 participants