-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
wp_enqueue_block_style no longer adds styles in the site editor if Gutenberg 13.0 is active #40469
Comments
I confirmed that this is still happening with 6.0-beta2-53249 and current Gutenberg trunk. Can someone confirm if this was an intentional change or a bug? |
It doesn't look like it's an issue with WordPress core. |
I am marking this as a regression. I will try to debug the issue later this week. |
@carolinan, @Mamaduka when enqueueing stylesheets via add_editor_style, they are also noticeably absent. |
Just confirmed this no longer works in 6.0 RC1 (without Gutenberg active). I'm elevating this issue as it's a breaking change. |
As noted in #40562 (comment). It must be something with passing styles to the iframed editor. The following sentence is a great confirmation of that:
|
Possibly related: |
@carolinan yup, that looks to be the same issue. So it appears this was introduced in 13.0, I'm going to start going through the changelog there. |
wp_enqueue_block_style uses enqueue_block_assets to add editor styles, Gutenberg active, I need to combine wp_enqueue_block_style with add_editor_style to add CSS to the site editor. |
:/ OK adding add_editor_style no longer works with 6.0 Rc1. It did work in beta 2. |
A potential fix is ready for testing: #40842. |
Description
In WordPress 5.9x, a block theme can use wp_enqueue_block_style to add additional stylesheets to blocks.
But when Gutenberg 13.0 is active, the styles are no longer applied in the site editor or template editor, only in the block editor and the front.
Step-by-step reproduction instructions
Activate a theme that uses wp_enqueue_block_style.
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 5.9.3
Gutenberg 13.0
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: