Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support presets for column block widths #55259

Open
cbirdsong opened this issue Oct 11, 2023 · 0 comments
Open

Support presets for column block widths #55259

cbirdsong opened this issue Oct 11, 2023 · 0 comments
Labels
[Block] Columns Affects the Columns Block [Type] Enhancement A suggestion for improvement.

Comments

@cbirdsong
Copy link

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:

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Block] Columns Affects the Columns Block labels Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants