Theme.json: Block specific CSS is printed even if a block is not used on the current page #31642
Labels
CSS Styling
Related to editor and front end styles, CSS-specific issues.
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
[Type] Enhancement
A suggestion for improvement.
[Type] Performance
Related to performance efforts
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: