Reduce specificity of global styles body margin reset rule.#61340
Reduce specificity of global styles body margin reset rule.#61340tellthemachines merged 1 commit intotrunkfrom
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
|
|
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 <isabel_brison@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
|
@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), thebodyrule 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