-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Apply Global Border-Box Sizing to all blocks that have a border style #64788
base: trunk
Are you sure you want to change the base?
Apply Global Border-Box Sizing to all blocks that have a border style #64788
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: -2.67 kB (-0.15%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
0892489
to
3b609a4
Compare
* and a style attribute containing 'border'. | ||
* This ensures consistent box-sizing behavior and makes layout calculations more predictable. | ||
*/ | ||
[class*="wp-block-"][style*="border"] { |
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.
One catch with this selector is that it would only apply to blocks with border styles applied on the block instance. If a border was applied to a block type via global styles it wouldn't have the correct box-sizing.
This also only covers the application of borders where box-sizing has historically been set for blocks that adopt padding support as well.
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.
Thank you for your valuable feedback. I will work on this.
Added a global rule to apply box-sizing: border-box to all blocks that have a border style.
Follow Up of #43247 (Discussion #64615 (comment))
Used Global CSS Instead of box-sizing: border-box separately in all blocks.