Skip to content

theme.json styles are not loaded when previewing a FSE theme in the Customizer #34531

@andersnoren

Description

@andersnoren

Description

If you have a non-FSE theme active, go to the Customizer, click the "Change" button next to the name of the active theme, and select a FSE theme to preview, the preview that gets loaded doesn't include any of the theme.json styles in the theme.

The preview does work if you have a FSE theme active (like Blockbase) and preview a different FSE theme (like TT1 Blocks), but not if your active theme is a non-FSE theme.

Step-by-step reproduction instructions

  1. Activate a non-FSE theme, like Twenty Twenty-One.
  2. Go to the Customizer.
  3. Next to the theme name, click the "Change" button and select a FSE theme, like TT1 Blocks.
  4. The preview is loaded, but the theme.json styles are not output, resulting in the theme looking broken.

Screenshots, screen recording, code snippet

image

Environment info

WordPress 5.8, Gutenberg 11.4.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

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions