fix(IconButton): keep xs size at 16px with the border - #1182
Conversation
The stroke added two pixels outside the padding box. Use border-box sizing and reduce xs padding by 1px per side. Fixes ClickHouse#539
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 0518c22. Configure here.
| var(--click-button-iconButton-xs-space-x); | ||
| /* Border adds 2px; drop 1px padding per side so xs stays 16×16. */ | ||
| padding: calc(var(--click-button-iconButton-xs-space-y) - 1px) | ||
| calc(var(--click-button-iconButton-xs-space-x) - 1px); |
There was a problem hiding this comment.
Negative xs padding misses target size
Medium Severity
The xs space tokens resolve to 0, so calc minus 1px is negative padding. CSS clamps that back to 0. The button still wraps a 16px sm icon plus a 1px border, so it stays 18×18 instead of the intended 16×16.
Reviewed by Cursor Bugbot for commit 0518c22. Configure here.


xs IconButton is supposed to be 16×16. The 1px stroke sat outside the padding box. Use border-box sizing and drop 1px of xs padding per side.
Fixes #539