Skip to content

Root padding collapsing unexpectedly #56229

Closed

Description

Description

Through some trial and error I think I've isolated why I've struggled with the rootPaddingAwareAlignments features that is supposed to help with managing the root application padding in regards to block alignment. Layout is a bigger conversation and I think there are a few issues here that bear discussing. But to keep this simple I think I've identified two situations in which this feature is behaving unexpectedly.

FIrst, If you group a set of blocks and that group has the combo of "layout":{"type":"constrained"} and "align":"full" then its children will breach the root padding. The group here has a blue background.

Screenshot 2023-11-16 at 1 36 39 PM

Second, if you group a set of blocks and that group has the combo of "layout":{"type":"default"} and "align":"full" then it's direct children will respect root padding but other direct child groups and their children will breach root padding. The blue group here has a nested group with a gray background and you can see it's children breaching root padding.

Screenshot 2023-11-16 at 1 36 16 PM

Step-by-step reproduction instructions

Set rootPaddingAwareAlignments to true
Add root padding in styles.spacing.padding
Group a set of blocks
Add "layout":{"type":"constrained"} and "align":"full"
check the preview at a narrow screen width.

set "layout":{"type":"default"} and add a nested group with any settings that contains blocks.
check the preview at a narrow screen width

Screenshots, screen recording, code snippet

No response

Environment info

WP 6.4.1
PHP 8
wp-now env

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Feature] LayoutLayout block support, its UI controls, and style output.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions