Bring "section style" JSON partials to feature parity with WP_Block_Styles_Registry::register #63263
Labels
[Feature] Block Style Variations
Issues or PRs that are related to the style variations for blocks
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
There are a few arguments in the WP_Block_Styles_Registry that aren't present in the new "Section Styles" feature. It would be great to bring these arguments all to parity so that "section styles" could become a 1:1 replacement for PHP/server-side registration of block styles.
What is your proposed solution?
In section styles JSON files, consider adding support for
style_handle
- the ability to reference a CSS file registered by the themeis_default
- the ability to modify/set the default styles for a blockThe second one in particular would be particularly handy for making themes more composable and trimming down the site of the theme.json file. All block styles could be defined as separate JSON files, blocks could share default styles if necessary, etc. (This has been replaced with #63307)
Related: https://developer.wordpress.org/reference/classes/wp_block_styles_registry/register/
Related: https://make.wordpress.org/core/2024/06/24/section-styles/
The text was updated successfully, but these errors were encountered: