-
Notifications
You must be signed in to change notification settings - Fork 1
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
PostCSS usage is broken in editor if Yoast is used. #120
Comments
Here's the ticket in Yoast: Yoast/wordpress-seo#20535 |
Maybe take a look at build tool for: https://github.com/WebDevStudios/wds-bt |
As an example for testing, add the following to the playground:
Then in an editor-facing stylesheet (like wp-editor.css), this will work:
.group-1 {
.editor-styles-wrapper .group-1 {
|
When Yoast is active, the editor canvas iframe falls back to the old div.editor-styles-wrapper version that attempts to scope all CSS. When using PostCSS, currently nested CSS gets output as nested CSS, since it has support in all modern major browsers; but, in the old div.editor-styles-wrapper version of the editor, this causes parent CSS to have .editor-styles-wrapper nested between them and their children.
Issue opened here for that issue.
Solutions:
enqueue_block_editor_assets
hook, but things break outside the editor: nothing is scoped in the old div.editor-styles-wrapper version of the editor.The text was updated successfully, but these errors were encountered: