Skip to content
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

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

Closed
aristath opened this issue Jan 29, 2021 · 1 comment · Fixed by #28731
Closed

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

aristath opened this issue Jan 29, 2021 · 1 comment · Fixed by #28731
Assignees
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@aristath
Copy link
Member

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
@aristath aristath added [Type] Bug An existing feature does not function as intended [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jan 29, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 29, 2021
@aristath
Copy link
Member Author

aristath commented Feb 5, 2021

Thank you @nosolosw 🙌🙌🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants