-
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
Reduce specificity of global styles body margin reset rule. #61340
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.74 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.
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.
I just cherry-picked this PR to the release/18.3 branch to get it included in the next release: 46c1ecb |
Co-authored-by: tellthemachines <[email protected]> Co-authored-by: andrewserong <[email protected]> Co-authored-by: ramonjd <[email protected]>
@tellthemachines, I think this change caused a regression for non-iframed editors reported here: #61565 and #61582. |
What?
Follow-up to #60106, which reduced the specificity of global styles rules generated from theme.json and user settings. Because any base styles defined in theme.json are now output under
:where(body)
, thebody
rule that resets margin to 0 will override any margins defined in theme.json.This PR reduces the specificity of the body margin reset (it still overrides user agent styles at zero specificity) so it doesn't interfere with theme-defined styles.
Props to @dsas for bringing this to my attention!
Testing Instructions
style.spacing.margin
, e.g."top": "20px", "bottom": "20px"
Testing Instructions for Keyboard
Screenshots or screencast