Skip to content

fix(ui-buttons): fix ai-secondary button size diff#2617

Open
git-nandor wants to merge 1 commit into
masterfrom
INSTUI-5061_ai_button_size_fix
Open

fix(ui-buttons): fix ai-secondary button size diff#2617
git-nandor wants to merge 1 commit into
masterfrom
INSTUI-5061_ai_button_size_fix

Conversation

@git-nandor

Copy link
Copy Markdown
Contributor

INSTUI-5061

Summary

An ai-secondary button was 2px taller (and, for icon-only buttons, 2px wider) than the same button in any other color.

ai-secondary removes the real border and renders its gradient "border" as a ::before ring whose space is reserved by padding. That padding is additive to the content's full minHeight, adding 2px to the outer size.

The fix shrinks the ai-secondary content box by 2 × borderWidth (height, plus width for icon-only buttons), so the reserved padding is compensated and the outer size is identical regardless of color.

Test:

Verify that the buttons have the same size.

<div>
  <IconButton screenReaderLabel="Add" color="ai-secondary"><IconAddLine /></IconButton>
  <IconButton screenReaderLabel="Add"><IconAddLine /></IconButton>
</div>

@git-nandor git-nandor self-assigned this Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2617/

Built to branch gh-pages at 2026-07-01 11:00 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Visual regression report

⚠️ Changes detected.

Status Count
Unchanged 31
Changed 1
New 0
Removed 0

📊 View full report

Diff images (1)

button-and-derivatives.png — 3500 pixels differ

Baselines come from the visual-baselines branch. They refresh on every merge to master.

github-actions Bot pushed a commit that referenced this pull request Jul 1, 2026
@git-nandor git-nandor marked this pull request as ready for review July 1, 2026 13:17
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.

1 participant