-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Block Variation Transforms: Add box-sizing rule #71052
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
Block Variation Transforms: Add box-sizing rule #71052
Conversation
|
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: +4 B (0%) Total Size: 1.91 MB
ℹ️ View Unchanged
|
ramonjd
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.
|
Thanks for the quick review @ramonjd!
Yes, that's expected — I mightn't have made it clear enough in my testing instructions! This is more of a code quality fix than a bug fix, as the issue isn't present in Gutenberg (but rather, if you're using this component in an environment that doesn't already provide the |
|
Flaky tests detected in 2263c13. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/16738578974
|


What?
Semi-related to: #70684
This is a similar kind of PR to a couple of my earlier ones at trying to ensure that block editor components are responsible for their own dependencies. After fixing
fieldsets in #70685, I noticed that the block variation transforms components (i.e. the switcher in the right hand sidebar for the Group block) expects a globalbox-sizingrule in order to prevent a horizontal scrollbar from happening.This tiny PR seeks to make sure that the block variation transforms component is responsible for its own sizing.
Why?
To ensure that (similar to the components library) block editor components are taking care of their own resets / aren't so dependent on global rules.
How?
Add a
box-sizing: border-boxrule to the block variation transforms component.Testing Instructions
This is a little artificial, but open up the post editor, add a Group block, and inspect element on the switcher in the sidebar where you switch to Row, Stack, Grid, etc.
Toggle the box-sizing rule for the post editor off, and on
trunkyou'll end up with a horizontal scrollbar.With this PR applied, no scrollbar should be present.
Screenshots or screencast
Before
After