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

Move block style variation CSS to theme.json #8

Open
justintadlock opened this issue Apr 1, 2024 · 0 comments
Open

Move block style variation CSS to theme.json #8

justintadlock opened this issue Apr 1, 2024 · 0 comments
Assignees
Labels
🧪 Enhancement Spinning up new features in the lab. WordPress Issue Whatcha doin' to me WordPress/Gutenberg?

Comments

@justintadlock
Copy link
Contributor

Currently, nearly every style variation in the theme requires defining CSS properties via settings.blocks.blockName.custom, which are applied via block stylesheets. This is so that they can be overwritten via JSON in global style variations or child themes.

There are major limitations with this method, namely that the CSS properties are loaded on every page, even when they are unneeded.

Requires:

@justintadlock justintadlock added 🧪 Enhancement Spinning up new features in the lab. WordPress Issue Whatcha doin' to me WordPress/Gutenberg? labels Apr 1, 2024
@justintadlock justintadlock self-assigned this Apr 1, 2024
justintadlock added a commit that referenced this issue Jun 1, 2024
Use the new block style variations mechanism to register Group block styles as "sections."

Partial fix for #8
justintadlock added a commit that referenced this issue Jun 1, 2024
This is continued work for: #8
justintadlock added a commit that referenced this issue Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 Enhancement Spinning up new features in the lab. WordPress Issue Whatcha doin' to me WordPress/Gutenberg?
Projects
None yet
Development

No branches or pull requests

1 participant