Repository navigation
Conversation
… the HTML element in the block editor. Doing this effectively reduces specificity of backwards compatibility rules using :where() so they do not override any theme rules in :root. Rollback
|
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. |
ramonjd
left a comment
There was a problem hiding this comment.
Needs a fair bit of backwards compat testing, but seems to work on the surface.
| // For full-wide blocks, we compensate for the base padding. | ||
| // These margins should match the padding value above. | ||
| html :where(.editor-styles-wrapper) { | ||
| :where(html.editor-styles-wrapper) { |
There was a problem hiding this comment.
Test according to original issue:
| @import "./editor-elements.scss"; | ||
|
|
||
| :root .editor-styles-wrapper { | ||
| :where(html.editor-styles-wrapper) { |
There was a problem hiding this comment.
Test according to original PR:
| * When the post editor is fully i-framed, this extra classname could be removed. | ||
| * Note: in the block editor, `.editor-styles-wrapper` is added to the HTML element | ||
| * in the `IFrame` component, packages/block-editor/src/components/iframe/index.js. | ||
| */ |
There was a problem hiding this comment.
Just formatting mainly. Added note about location of classname
|
|
||
| documentElement.classList.add( 'block-editor-iframe__html' ); | ||
| documentElement.classList.add( | ||
| 'block-editor-iframe__html editor-styles-wrapper' |
There was a problem hiding this comment.
Main thrust of this PR occurs here
|
Size Change: +10 B (0%) Total Size: 1.73 MB
ℹ️ View Unchanged
|
|
Closing this one as it causes more problems than it fixes. |
Warning
This PR is just an exploration. A lot of the code depends on the .editor-styles-wrapper class being on the body tag, so it's probably not viable.
What and how? And why?
Exploring solutions to:
This is a test to move the reduce the .editor-styles-wrapper class to the HTML element in the block editor.
Doing this effectively reduces specificity of backwards compatibility rules using :where() so they do not override any theme rules in :root.
Testing Instructions