Skip to content

Support presets for column block widths #55259

Open

Description

What problem does this address?

Right now there are de facto preset widths for the column block thanks to these variations:

A freshly created column block asking the user to pick from presets like 50/50 and 66/33

However, a user that picks one of these and changes their mind is faced with a text field they have to manually enter a width into:

The column width field, showing a manually entered "33.33%" value.

This is particularly confusing if they picked one of the options with equal width columns, as the column width field defaults to a pixel width instead of a percentage:

The blank column width field, with a pixel unit

What is your proposed solution?

The column block width field should start as a list of presets that the user picks from, with a "custom" as a secondary option, similar to the way text or spacing size presets work.

This change would also have other benefits. CSS values like "auto", "max-content" and "min-content" that currently can't be used could be made available as presets, making the column block more flexible. Presets would also allow the editor to generate classes for width settings instead of inline styles, improving compatibility with strict CSPs.

Related issues:

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

Metadata

Assignees

No one assigned

    Labels

    [Block] ColumnsAffects the Columns BlockAffects the Columns Block[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.A suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions