-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
What problem does this address?
For example, when building custom blocks such as an Accordion, there are more color settings than just the background & text color. Similar to how the Navigation block currently does it, we have the ability to add custom color settings to the block itself. But that means there is no way for someone to manipulate the global appearance of this block. So every instance always needs to get customized manually.
Another example is how the button block/element has special treatment. No custom block can opt into / recreate the pseudo-state global styles interface.
Block Styles Settings Sidebar
Block Global Styles Color Settings Sidebar
What is your proposed solution?
Similar to how we add custom settings to blocks themselves, there should be a way to expose custom settings in the global styles interface of individual blocks. This could work as a way to override the default value for these custom attributes.
We already add new color settings to individual spots in the inspector controls. If a block adds something in the correct group it should not just appear for the block sidebar itself but also the global styles interface.
<InspectorControls group="color">
{ // whatever gets rendered here should show both in the Inspector and in the Global Styles color options }
</InspectorControls>Metadata
Metadata
Assignees
Labels
Type
Projects
Status

