-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ui/Button: add min width
#75133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
ui/Button: add min width
#75133
Conversation
aa2bf0f to
15be33d
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 3 MB ℹ️ View Unchanged
|
|
I guess one question is whether we want to apply similar changes to the |
aduth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a technical perspective 👍
On the question of @wordpress/component's Button parity, it's probably low risk and we should try to keep the styles in sync, though as an enhancement it feels within reason that we could limit this to the new implementation as an opt-in.
|
I like the video, thanks for doing this. I'll defer to Andrew and Jay if he chimes in on technical pieces, though ask about this one: Should this be a CSS variable? Is this how an implementer should change the min-width? Or should they not change the min-width from the default 4? |
What?
Follow-up to #74415
Add a minimum switch to the
Buttoncomponent in the@wordpress/uipackageWhy?
For better UI balance, especially when buttons with very short labels are paired with button with longer labels
How?
By adding a
min-widthCSS property:chunit, ie. it is explicitely related to the amount of charactersunstyledvariantsIconButtoncomponentTesting Instructions
Play around in Storybook, changing the label text
Screenshots or screencast
Kapture.2026-02-02.at.14.20.10.mp4