Skip to content

Group Block: Add block justification setting to the layouts tab #30559

@andersnoren

Description

@andersnoren

In Full Site Editing themes, the group block allows you to modify the width of blocks contained in group blocks, either by specifying a width manually or by checking "Inherit default layout", which sets the width of the child blocks to the default content widths in the theme.

image

Currently, the child blocks are always given a horizontal margin of auto, centering them in the group block they're in. I think it would be useful to add the option to choose justification of the child blocks in the group, so you can choose whether to set them to the left, center or right of the group, with center being the default.

For example, if you have a columns block with each column containing an image, a heading and text, you might want to limit the width of the heading and paragraph to preserve readability. But if you wrap the heading and the text in a group block and set a width limit, the heading and text become centered in the column.

image

Some might prefer this, of course, but those who would rather have the heading and text align with the left or right side of the column currently have no way of doing that. Another common example is headings justified to the left of the outer edge of the content, like this:

image

Which can't be replicated out of the box currently, since the child blocks of the group are always centered:

image

TLDR; adding a child block justification setting for groups would add a lot more flexibility when creating layouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] GroupAffects the Group Block (and row, stack and grid variants)[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions