-
Notifications
You must be signed in to change notification settings - Fork 126
Add section styles #142
Description
This is a suggestion for adding section styles, block style variations that can be applied to, in this case, the group block.
Each style would use an accessible combination of two or more colors from the palette, and each style needs to continue to work when the user changes the color palette preset.
The purpose is to make it easy for users to change the style of a part of their content, pattern, or templates.
Section styles are .JSON files placed in the styles folder or a subfolder to styles.
Each file needs to include: schema, version, title, slug, one ore more block types, and the styles.
Section styles can not include settings. For example, it can set a font size, but not add new font size options to the typography control.
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"title": "Base",
"slug": "section-1",
"blockTypes": [ "core/group" ],
"styles": {}
}
Each the section style would include:
- Background color and text color. Link color, if different from text color.
- Spacing
- Styles for elements:
- Buttons
- Headings
The CSS for these style variations are often repeated multiple times on the same page, which is why I recommend limiting the styles.