Skip to content

No way to set custom style for rows #48109

@bradhogan

Description

@bradhogan

What problem does this address?

Currently, you can only use register_block_style to register styles for the parent group block.

What is your proposed solution?

Add ability to target rows (and stacks for that matter). In my case, the use case is that I'm going to add a style to rows only that would wrap the row with a "three-col-max-per-row" class so I can have more control over the style of a column-like grid layout. Unfortunately the columns block is currently pretty limiting. Example: if I want three equal columns on large screen, condensed down to two columns on a laptop and one on mobile, I can't do that unless I write specific custom CSS into the theme.

Alt option would be to add a "max / min columns" to the columns block. Might also require a toggle of some sort to set columns as equal width.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ColumnsAffects the Columns Block[Block] GroupAffects the Group Block (and row, stack and grid variants)[Feature] LayoutLayout block support, its UI controls, and style output.[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions