WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.19k forks source link

Nested blocks should always honor the parent content and wide widths when set #65091

Open afercia opened 1 month ago

afercia commented 1 month ago

Description

Noticed while working on https://github.com/WordPress/gutenberg/issues/64906

Some blocks may contain nested blocks and provide the ability to set a custom 'content width' and a custom 'wide width' for the nested blocks. For example, the Group, Cover, Columns block support this feature.

This is different from the 'content width' and 'wide width' set by the theme or in the Global styles. Instead, these custom widths are block attributes and are meant to be applied only to the nested blocks of a specific parent block.

So far so good. However, it appears not all nested blocks are fully compatible with this feature. Also, setting a background on the nested paragraph make things even more unclear. As a user, I'm very confused by how this feature works and by how it's presented in the UI.

Step-by-step reproduction instructions

At this point, the editor should be in the state illustrated in the screenshot below:

Screenshot 2024-09-05 at 14 20 04

Screenshot:

Screenshot 2024-09-05 at 14 29 30

Screenshot:

Screenshot 2024-09-05 at 15 08 02

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

afercia commented 1 month ago

Overall, as a user I would expect the following: