-
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
Separator block: Reduce default border styles to avoid conflicts with global styles #60740
Conversation
Size Change: +27 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
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.
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @dashkevych. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
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 fixing this, changes LGTM!
What?
Fixes #60634, similar to #60649
Reduce the specificity of the Separator block's default border rules.
Why?
With global styles rules specificity being reduced as of #60106, the default border styles for the Separator block unintentionally override border rules set for the Separate block in
theme.json
. This is a slightly tricky issue as the Separator block has not formally opted in to the Borer block support. However custom border rules are in use in TT4 so it's a good bug to address.Because some themes might still depend on the higher specificity of the
theme.scss
rules, I've left them untouched. A good example would be a Classic theme that uses overly specific reset rules to set borders to0
but that then opts in towp-block-styles
to receive the opinionated block styles. If we believe those rules should be lowered, too (thetheme.scss
ones for this block), I'd suggest looking at doing that in a separate PR potentially.How?
Wrap the Separator block's border styles in a
:where()
rule for consistency with global styles rules.Testing Instructions
Screenshots or screencast
Before
The Separator block's
2px
rule overrides the1px
from TT4:After
TT4's
1px
rule overrides the Separator block's default styles:Here's where TT4 sets its width:
https://github.com/WordPress/wordpress-develop/blob/f6747a384f56893aac4870979c71f02f72d2e624/src/wp-content/themes/twentytwentyfour/theme.json#L743