-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When registering a block style variation (i.e. section style), the "blockGap" value isn't being output in the editor or on the front end. Other spacing values are working ("spacing.padding", "spacing.margin").
This is particularly useful in a number of blocks with flex layout options (column, group, navigation) and works when added as a value to the block in theme.json (styles.blocks) but not when added to a section style.
Step-by-step reproduction instructions
Add a new section style JSON file to your theme's /styles/ directory:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"title": "Footer Nav 1",
"slug": "navigation-footer-1",
"blockTypes": ["core/navigation"],
"styles": {
"spacing": {
"blockGap": "var:preset|spacing|60"
}
}
}
This doesn't work.
However, adding this to your theme.json:
"core/navigation": {
"spacing": {
"blockGap": "var:preset|spacing|80"
}
}
works fine.
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 6.6-RC2
- Gutenberg 18.7.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.