Skip to content

fix(IconButton): keep xs size at 16px with the border - #1182

Open
Mora140 wants to merge 1 commit into
ClickHouse:mainfrom
Mora140:fix/iconbutton-xs-padding
Open

fix(IconButton): keep xs size at 16px with the border#1182
Mora140 wants to merge 1 commit into
ClickHouse:mainfrom
Mora140:fix/iconbutton-xs-padding

Conversation

@Mora140

@Mora140 Mora140 commented Sep 3, 2026

Copy link
Copy Markdown

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

The stroke added two pixels outside the padding box. Use border-box
sizing and reduce xs padding by 1px per side.

Fixes ClickHouse#539
@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0518c22

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant

CLAassistant commented Sep 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0518c22. Configure here.

@XOP XOP added invalid This doesn't seem right on hold On hold until further notice, do not merge labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right on hold On hold until further notice, do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IconButton has 2 extra pixels because of the border

3 participants