Setting layout settings in theme.json removes align left/center/right options from blocks like image/video/etc..
Description
When experimental-theme.json is used and layout properties are specified, blocks that usually support left/center/right alignment no longer have these options when they are top level blocks.
If this is somehow intended then this issue turns to: How can we disable wide/full width for a specific post type when using theme.json?
Step-by-step reproduction instructions
code in experimental-theme.json that results in missing alignment options:
{
"settings": {
"defaults": {
"layout": {
"contentSize": "800px",
"wideSize": "1140px"
}
}
}
}
Expected behaviour
Expecting to see buttons Align Left, Align Center, Align Right, Wide Width and Full Width.
Actual behaviour
Only see Wide Width and Full Width.
WordPress information
- WordPress version: 5.7.1
- Gutenberg version: 10.4.1
- Are all plugins except Gutenberg deactivated? Yes
- Are you using a default theme (e.g. Twenty Twenty-One)? No. Following this guide: https://developer.wordpress.org/block-editor/how-to-guides/block-based-theme/
Closing as duplicate of https://github.com/WordPress/gutenberg/issues/30934
Hello, the ID you provided as reference for duplicate is actually this issue.
Closing as duplicate of #30934 Hello, the ID you provided as reference for duplicate is actually this issue.
Thank you, the correct ID is #30568.