Skip to content

wp_enqueue_block_style no longer adds styles in the site editor if Gutenberg 13.0 is active #40469

@carolinan

Description

@carolinan

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.

  1. In the site editor, add one of the styled blocks.
  2. Save and view the front.
  3. Compare the Site Editor and front and see that the styles do not match.

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

Metadata

Metadata

Assignees

Labels

[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Priority] HighUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions