-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Description
This is a little difficult to explain, but follow these steps.
First, delete all blocks from the Single Posts template, insert just a Content block, and enable the "Inner blocks use content width" setting.
The template HTML should be like this:
<!-- wp:post-content {"layout":{"type":"constrained"}} /-->Create a new post, insert a Heading block and save the post. The Heding block has the align control:
Back to the Single Posts template, select the Content block, enter a number in the "Content Width" or "Wide Width" field, then delete them, and save the template.
The template HTML should be like this. Note that the values are added as an empty string.
<!-- wp:post-content {"layout":{"type":"constrained","contentSize":"","wideSize":""}} /-->Back to the post. The Heading block DON'T have the align control:
If contentSize or wideSize is empty, I think the attribute itself shouldn't be saved.
Step-by-step reproduction instructions
Described above.
Screenshots, screen recording, code snippet
31cce8eca1c6dc334957c37e13f2f2c3.mp4
Environment info
No response
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
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure