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

Columns: add min and max width settings for responsive control #40870

Open
StevenDufresne opened this issue May 6, 2022 · 8 comments
Open

Columns: add min and max width settings for responsive control #40870

StevenDufresne opened this issue May 6, 2022 · 8 comments
Labels
[Block] Columns Affects the Columns Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Comments

@StevenDufresne
Copy link
Contributor

StevenDufresne commented May 6, 2022

What problem does this address?

The <Columns> block is really useful in constructing responsive layouts, especially when they are nested together. However, there are times when you want columns to stack before the mobile breakpoint is triggered to avoid some awkward layouts.

What is your proposed solution?

Add min and max support to the Columns block so a user could define a minimum number of columns, like 2, and a max, like 6, which would mean that on mobile the columns would collapse down to 2 rather than stacking.

@webdados
Copy link

I think that before doing it at the columns block level, this should be easier to set globally at the theme level.
Not saying it's not useful to have it at the block level, but I think that should be a second feature. What we really need is a way to change the mobile>desktop responsive breakpoint globally on a website.

@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@youknowriad youknowriad removed the [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") label Oct 24, 2024
@andrear9
Copy link

andrear9 commented Nov 3, 2024

Image

Something like this would be perfect!

@annezazu annezazu changed the title Make "mobile" setting for columns block modifiable. Columns: add min and max width settings for responsive control Dec 3, 2024
@annezazu
Copy link
Contributor

annezazu commented Dec 3, 2024

Renaming this issue (hope that's okay) to focus it a bit more around allowing for min and max width settings. This means that essentially a user could define a minimum number of columns, like 2, and a max, like 6, which would mean that on mobile the columns would collapse down to 2 rather than stacking.

@annezazu
Copy link
Contributor

annezazu commented Dec 3, 2024

Calling on @WordPress/block-themers as it would be helpful to have some folks explain how you would achieve this with regular CSS to get a clearer idea of what settings/block supports need to be implemented. If anyone has time, please chime in directly on this issue!

@t-hamano
Copy link
Contributor

t-hamano commented Dec 4, 2024

Not a perfect solution, but maybe a Grid block variation would help?

Image

a05df6185771035660ef20368c9be1b9.mp4

By the way, I understand that there are many suggestions regarding responsive UI.

https://github.com/WordPress/gutenberg/issues?q=is%3Aissue%20state%3Aopen%20responsive%20in%3Atitle

@jasmussen
Copy link
Contributor

I've been pondering this issue with the following mockup:

Image

A min-column width control is an option, though there's some simplicity in doing that math for the user.

@MaggieCabrera
Copy link
Contributor

I've found myself wanting this control for grid more than I have for the columns block personally!

@annezazu
Copy link
Contributor

annezazu commented Dec 4, 2024

@MaggieCabrera I think we need it in both! The Grid experiment allows for this because it relies on a combination of max columns and minimum column width.

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 [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

9 participants