fix(button): align list-variant label with icon line-box#520
Merged
kelsos merged 1 commit intorotki:mainfrom Apr 27, 2026
Merged
fix(button): align list-variant label with icon line-box#520kelsos merged 1 commit intorotki:mainfrom
kelsos merged 1 commit intorotki:mainfrom
Conversation
Tighten the list-variant label to `leading-[1.125rem]` so its line-box matches the md icon (`--rui-icon-size: 1.125rem`). Without this, the 20px label line-box (from `leading-5` on the root) is flex-centered against the 18px icon box and the baseline-aligned glyphs visually drift above the icon's optical center — most readable in tight list rows like the rotki UserDropdown menu. Adds a list-variant section to the example app and an e2e assertion that the label and icon centers line up. Closes rotki#515
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #520 +/- ##
=======================================
Coverage 84.87% 84.87%
=======================================
Files 143 143
Lines 5209 5209
Branches 1553 1553
=======================================
Hits 4421 4421
Misses 788 788 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
variant=\"list\"button label toleading-[1.125rem]so its line-box matches the md icon (--rui-icon-size: 1.125rem). Without this, the 20px label line-box (fromleading-5on the root) is flex-centered against the 18px icon box and the baseline-aligned glyphs visually drift above the icon's optical center — most readable in tight list rows like the rotkiUserDropdownmenu.Closes #515
Test plan
pnpm -w run typecheckpnpm -w run lintpnpm test:run RuiButton.spec.ts— 21 passpnpm test:e2e button.spec.ts— 2 pass (existing + new list-variant alignment test)/buttons) — list-variant section, every size, label sits centered with the prepend icon