-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Discussion: Global styles for non FSE themes #24326
Comments
I think this would be useful. I am looking at updating old themes to be more Gutenberg friendly, which involves adding a lot of |
This would be extremely useful... |
I only came across this today. It discusses a few different things, so I'll try to comment on them separately. When every part is enabled: core, theme, userComplementing what I said here. This is how it works right now with the plugin active:
How users can tweak the styles#24250 proposes to do this via edit-site, which requires the FSE experiment being enabled and the theme to have some templates. This is not a requirement for Global Styles and we may add it to other places, if it makes sense. Also worth noting is that we're starting to explore deeper integration between templates and global styles (site block) to allow to style things contextually. Things like: set the background color of a paragraph within a sidebar differently from the background color of a paragraph in post content. The scope of styles
Could you expand on this? |
For a full site editing theme, there is no limitation, the styles affects all blocks and that is expected because everything is a block and everything can be edited, both with global styles and individually. For a PHP based theme, should global styles affect the entire site (as it does now), or only the blocks inside the sites content areas, where the user can work with blocks? In a PHP based theme, I could use a columns block so that I don't have to create my own responsive, 3 column footer. And then the global styles will help the user style that area, without me having to code several custom customizer options for colors. That is the big win. But I might also have a heading above my blog post list, that is not a block, and I might not want that heading to be affected by global styles for headings. |
I am closing this because I believe it is working as intended. If there are any new findings when people start creating more universal themes we can continue discussions here or in a new issue. |
Currently, the global styles experimental-theme.json affect themes that has no other support for full site editing, and it affects themes when full site editing is not enabled.
The styles added affects all areas of a theme, not only the content. Is this intentional?
The global style controls are planned to be placed in a panel in the site editor, and would only be available when full site editing is enabled.
Will themes that are not full site editing themes, but want to take advantage of the presets and block styles, have access to the controls?
The text was updated successfully, but these errors were encountered: