-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update has-text has-icon button spacing #50277
Conversation
Size Change: +4 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
Hah, nice. Is this similar to #50241? Agreed, gap is nice. The left padding in this case does not look balanced in either before or after, though I know that's likely partially due to the visible area of the icon, and the built in clearance. But perhaps a grid unit 10 padding left, instead of grid-unit-15? |
Oh yes, pretty similar :)
Yes that's it. To get visually correct spacing with most of the core icon set, the spacing on the left should be 4px less than the spacing on the right. We can do that, but there will always be exceptions to the rule that will look strange. I suppose that's the preferred trade-off though. I'll push an update. |
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.
Looks good to me 👍
Needs a rebase! Thanks Jay. |
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
What?
Updates the padding applied the
has-text has-icon
buttons. Also reduces the spacing between label + icon, and usesgap
rather thanmargin
.Why?
The current spacing feels a but unbalanced.
gap
works better for RTL compared to left/right margin.How?
CSS.
Testing Instructions
Observe equal left/right padding applied to
has-text has-icon
like the View button in the Top Bar.Comparison
Note: The outline in the screenshot above is for illustrative purposes only. Here's how the button actually appears: