Skip to content

Global styles CSS-variables don't apply to the iframe in site-editor #28581

Closed

Description

@aristath

Description

When in the site-editor using an FSE theme, I can see that the CSS-variables get generated properly but they are applied to the main :root element. The problem is that they don't get applied to the root element inside the iframe, and as a result themes appear broken/unstyled.

Step-by-step reproduction instructions

  1. Install and activate the Q theme from its github repo: https://github.com/aristath/q - The theme.json file has already been updated to accommodate the latest structural changes.
  2. Visit the site-editor.

Expected behaviour

CSS-variables should be applied to the iframe and not the root element.

Actual behaviour

CSS-variables get applied to the root element and the iframe does not inherit them.

WordPress information

Device information

  • Device: Desktop
  • Operating system: Pop!_OS (basically Ubuntu)
  • Browser: Firefox & Chrome

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    [Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.
    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json
    on Jan 29, 2021
  2. aristath commented on Feb 5, 2021

    @aristath
    MemberAuthor

    Thank you @nosolosw 🙌🙌🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[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