-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Limit number of columns #10791
Comments
To my knowledge, this would not be possible except through very complex direct replacement of the Columns Ideally for themer extension, this would be something where the Columns block attributes could be extended / filtered to specify a |
Would be great to have the same filter functionality for the gallery block. |
+1 for the ability to limit the number of columns also on the Gallery Block. |
Created an initial PR for this now, see #12861. Any feedback welcome! |
I was thinking about this and I'm not sure it is a good idea to limit the minimum amount of columns to 2. Having 1 there would allow this block to work as a container which I'm pretty sure in some cases would be useful to add some custom classes to the block or something similar. |
This is better done in a separate section block, see #4900.
That sounds like a bug in the RangeControl component to me. I just crashed my browser by typing a super high number in there because adding columns is so slow. The maximum enforces a limit when clicking the upper arrow, but it's not validated |
Too late, issue open since 10 months, still no such block in Gutenberg, so people look for, find and use "one column" blocks as an alternative, one example of many out there... |
Having 1 as the minimum would make it work similar to the gallery block. Also makes sense for the following scenario:
Some plugins are already adding controls to customize a block's options given multiple breakpoints. This would be useful to have in core for theme developers and I guess it'll land at some point in the future? |
This could be achieved very neatly by the method we're proposing in #18892 |
As well as restricting column choices it would also be useful to be able to disable manual resizing (of column widths) for certain layouts; again the method proposed #18892 would seem like a clean and simple way to permit this; the block would just need to be made sensitive to the presence of the relevant |
Is there a way to add more than 6 columns? I'd like to have 8, but that is not supported right now. |
I am in the same boat. I understand the desire to limit, but I would prefer to have the control I need. |
When using the Columns block, is there a way to limit the number of columns?
As of now, the user can choose between 2-6 columns.
If I want to limit this to say, no more than 4 columns, how do I achieve that?
The text was updated successfully, but these errors were encountered: