-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
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 block
The 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/