-
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
Consider allowing themes to opt in to wp-block-styles via theme.json #37255
Comments
It would be awesome if Gutenberg by itself figured out which styles it needs based on block usage and loaded them on demand. Example: I'm using the Image block. It makes sense to include the Image styles, while still not needing to load all the other styles. |
@zaguiini this has been possible since WP 5.8, more info here: https://make.wordpress.org/core/2021/07/01/block-styles-loading-enhancements-in-wordpress-5-8/. It's still required for a theme to opt in as of WP 5.9beta2 but #35593 (comment) suggests it will eventually be enabled by default. |
Fixed by #40097 |
|
wp-block-styles
was considered and removed from #35593, as per @jasmussen's comment here.This seems ok to omit by default, but I do think it would be helpful for themes to have the option of using theme.json to opt into this feature in general. Currently, they must do so via
add_theme_support()
. Currently, this is the only theme support call that Twenty Twenty-Two needs to make, and it would be great to migrate that over totheme.json
.The text was updated successfully, but these errors were encountered: