-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[6.2] Block-specific additional CSS is not applied in post/page editor #48466
Comments
Looks like both the site-wide and the block-specific custom CSS aren't being enqueued in the post editor. Adding Changing
seems to do the job. Because this issue doesn't happen in the plugin with the iframed editor, would it be worth fixing directly in core? |
@glendaviesnz did you have Gutenberg enabled? I only tested on Core trunk so not sure how it might work with the plugin. |
Just core without plugin, but that file was being called it turned out but the |
Oh weird. I'm not 100% sure my suggestion is the exact way to do it though - but those styles do need to be enqueued for the post editor somehow! If anyone knows of a better way, please chime in 😄 |
The editors use settings to load global style custom CSS, similar to how we load other global styles. Plugin: https://github.com/WordPress/gutenberg/blob/trunk/lib/compat/wordpress-6.2/block-editor-settings.php#L8-L28 Update: I think I found the issue, it needs to be fixed in the core. I'll create PR shortly. |
Created core PR and the ticket. I think we can close this issue since there's no action required on the plugin side. |
The patch was committed https://core.trac.wordpress.org/changeset/55438. |
Just catching up on this. Thanks @Mamaduka 🙌 |
Description
In 6.2 Beta 3, custom CSS that is applied at the block level in Global Styles is not applied in the post/page editor. Everything works correctly in the Site Editor.
Note this only occurs in 6.2 Beta 3. Activating the Gutenberg plugin resolves the issues. Therefore I think this might be related to the fact that the iframed editor was recently removed from 6.2 but is still in Gutenberg.
Step-by-step reproduction instructions
color: red
Screenshots, screen recording, code snippet
custom-css.mov
Environment info
6.2 Beta 3
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: