-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Theme.json: Block specific CSS is printed even if a block is not used on the current page #31642
Comments
@aristath I wanted to check in if you still want to be assigned to this issue and if there is any progress. |
There is no progress because other things needed to be prioritized, and this issue may be sub-optimal behavior but it doesn't actually "break" anything, so it was not an urgent priority. I'm unassigning myself because maybe the "assigned" prevents someone else from working on it? 🤷 |
I'm interested in picking this up. Going to take Ari's offer and assign this to me. |
I had a go at this here: #39571 |
Here's an alternative version: #40513 |
This was closed by #41160 |
What problem does this address?
When you set defaults for a block using theme.json, the CSS is printed in
.global-styles-inline-css
even if the block is not used on the current page.What is your proposed solution?
Only include the CSS if the block is used on the current page.
The text was updated successfully, but these errors were encountered: