-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
FSE: Theme's stylesheet is enqueued outside the editor's <iframe> #28774
Comments
Another problem with styles...
Setting "link" to false inside theme.json doesn't change anything. |
👏 I have being trying to find the cause of this problem for hours and just stumbled upon this ticket. I have opened at ticket (WordPress/theme-experiments#201) in the Theme Experiments repo thinking it had something to do with the new experimental-theme.json file. But yes, I can confirm this issue with a similar testing setup to @adsheyn. |
This has already been fixed in #28731 so it will be included in the next minor release 👍 |
Thanks for looking into this @aristath and @nosolosw . All the styles are double enqueued. Right at the beginning of the There is also problem with the included styles itself. Some of them should not be enqueued at all. 1.) The first stylesheet contains this:I understand the need to provide some default stylling for the editor, but when a theme author provides their own styles through the add_editor_style() function, these defaults should not be included at all. That is very important because overriding them provides specifity problems. Especcially for plugin authors trying to style particular components. 2.) Default set of font families.Similary to the previous styles... As a theme developer I always declare font families to the basic html elements. Currently I have to do this: I really think that these kind of styles (editor defaults) should only be included if the theme has no 3.) Styles that comes from the theme using the add_editor_style() function.4.) Styles that comes from the theme using the add_editor_style() function.5.) Default editor variables that comes from the theme.json.Well, this is not actually a big problem, but I believe that css variables should come first. It is rather personal preference. 6.) Classes generated by the theme.json file.At the very beginning there is: Also, how to prevent automatic generation of these styles? |
Description
After upgrading Gutenberg plugin from 8.9.3 to 9.0 I've noticed that all the stylesheets that were before enqueued inside the editor's <iframe> window are now outside of it. I've tested this with my custom block-based theme as well as with TT1. Stylesheets are enqueued using the add_editor_style() function and worked before properly.
Step-by-step reproduction instructions
Expected behavior
Stylesheets provided by the theme should be enqueued inside of the editor's <iframe>.
WordPress information
Device information
The text was updated successfully, but these errors were encountered: