Opened 2 months ago
Last modified 8 weeks ago
#64912 new defect (bug)
Issue with the "layout" node on blocks in theme.json
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.9.4 |
| Component: | Editor | Keywords: | close |
| Focuses: | Cc: |
Description
Actual behaviour in WP 6.9.4, clean install
If you set the "layout" property on a block in theme.json without including the "wideSize" or "contentSize" child properties, the "align" control disappears from all its child blocks, i.e.
"settings": {
"blocks": {
"core/group": {
"layout": {
"allowCustomContentAndWideSize": false
}
}
},
...
}
This is also the case when "wideSize" and "contentSize" have been set correctly in the global "layout" settings:
"settings": {
"layout": {
"contentSize": "50rem",
"wideSize": "75rem"
},
...
}
Expected behaviour
When "wideSize" or "contentSize" are not included in the block layout node, I would expect the global "wideSize" or "contentSize" layout settings to apply.
In order to remove "wideSize" or "contentSize" layout support for a block, I would expect this to be done explicitly, i.e. "wideSize": false
Today I spent hours figuring out why the "align" control disappeared from all the child blocks in my custom block, where I had disabled "allowCustomContentAndWideSize" (only).
Hi
Changes to theme.json are developed and tested in Gutenberg first, so this issue needs to be opened
in the Gutenberg GitHub repository: https://github.com/WordPress/gutenberg
Please search to make sure it hasn't already been reported, before opening new issue.