This adds two (very) experimental themes: cblock and c0block.
cblock leverages block-templates to define the content
c0block leverages php templates to define the content
Both themes leverage theme.json to define styles.
The theme.json has a block called 'customizer' which is used to populate the customizer controls. Currently only 'color' types of controls are presented though additional (Boolean, text, etc) should be easy to add.
The objects in the 'customizer' collection define a slug, label, default value and type.
The "customizer-bridge.php" has been added to both themes but ideally this would instead be added somewhere higher (core?) or perhaps as a plugin.
This concept demonstrates a few things:
A theme doesn't have to use block-templates to be able to leverage theme.json (c0block)
The customizer can be controlled via configuration
That same configuration can be used to build out controls in other locations, in different ways (such as in a specific part of the Global Styles Editor) giving the customization options of theme.json an immediate workflow and a migration workflow without changing a theme.
That controls can be added to a theme.json file that provide "configuration points" that can be used in a theme.
For example, a theme can
define a color palette with "cool blue" as an option
define a customizable option of "primary color" which defaults to the "cool blue" palette option
assign the "primary color" variable as the text color to two particular block's border color: core/group & code/code
Changing the value of "primary color" to another value (either another value outlined in the palette or just a custom hex color) by way of the customizer will change the border color of the core/group and core/code blocks.
The Global Style Editor can be used to assign the border color of the core/code block from "primary color" variable to either another color from the palette or a custom hex color.
Most important I believe that this method of styling a block-based theme allows for the introduction of Block-based theme as a way of designing and building themes BEFORE the FSE/GSE tools are complete.
It puts into the hands of theme designers new tools, but doesn't eliminate the existing tools providing a bridge between how things work today and how things will eventually work.
This adds two (very) experimental themes: cblock and c0block.
cblock leverages block-templates to define the content
c0block leverages php templates to define the content
Both themes leverage theme.json to define styles.
The theme.json has a block called 'customizer' which is used to populate the customizer controls. Currently only 'color' types of controls are presented though additional (Boolean, text, etc) should be easy to add.
The objects in the 'customizer' collection define a slug, label, default value and type.
The "customizer-bridge.php" has been added to both themes but ideally this would instead be added somewhere higher (core?) or perhaps as a plugin.
This concept demonstrates a few things:
Most important I believe that this method of styling a block-based theme allows for the introduction of Block-based theme as a way of designing and building themes BEFORE the FSE/GSE tools are complete.
It puts into the hands of theme designers new tools, but doesn't eliminate the existing tools providing a bridge between how things work today and how things will eventually work.