Skip to content

fix(button): size styles use min-height so theme paddingBlock overrides can grow the button#3470

Open
Arman-Luthra wants to merge 2 commits into
facebook:mainfrom
Arman-Luthra:fix/button-min-height-theming
Open

fix(button): size styles use min-height so theme paddingBlock overrides can grow the button#3470
Arman-Luthra wants to merge 2 commits into
facebook:mainfrom
Arman-Luthra:fix/button-min-height-theming

Conversation

@Arman-Luthra

Copy link
Copy Markdown

summary

fixes #3379.

button size styles set a fixed height (28/32/36px). under box-sizing: border-box that fixed height absorbs any paddingBlock a theme adds, so the natural way to theme a taller button, a paddingBlock override, silently does nothing.

this pr lets padding drive the height. each size now sets minHeight: --size-element-* instead of height, and paddingBlock moves from the base styles (uniform 8px) into the size styles, paired per size so default geometry is unchanged: 20px label line-height + 2×4px (sm) / 2×6px (md) / 2×8px (lg) = 28/32/36px.

minHeight is already the sizing pattern in typeahead, tokenizer, and toolbar, with the same --size-element-* tokens.

behavior

  • default rendering is unchanged. sm/md/lg render at exactly 28/32/36px, verified in chromium.
  • theme overrides compose. 'size:lg': {paddingBlock: '10px'} grows the button to 40px, where before it stayed at 36px with no signal.
  • icon-only buttons stay square. aspect-ratio: 1/1 transfers the min-height to a min-width per css sizing rules, verified in chromium at 28/32/36px squares.
  • a theme that enlarges the label font tokens now grows the button to fit instead of clipping against the fixed height.

tests

two tests are new. one asserts each size resolves through min-height with no fixed height, the regression test for #3379. the other asserts the per-size paddingBlock pairing that keeps default geometry. the full suite passes.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

@Arman-Luthra is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla

meta-cla Bot commented Jul 2, 2026

Copy link
Copy Markdown

Hi @Arman-Luthra!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button hard-codes a fixed height per size, silently overriding theme paddingBlock overrides (theming a taller button requires non-obvious height: auto)

1 participant