-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add single column functionality to the Columns block #24065
Conversation
Size Change: +91 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
It definitely seems like the alignments mentioned in #24055 is something that should be supported. I wonder if columns is the right place to add this, though. There's also Group. It doesn't work at the moment because of the way group constrains it's inner blocks using the Maybe the inner container should only be present when the user wants to constrain the inner blocks to the content width? |
I think it is, for a few key reasons:
|
It would be helpful to have the option to be able to add 1 column in a layout. |
Couldn't agree more. I got stuck with the fact that single column wasn't available and had to resolve using a Group to group ... one thing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richtabor I've reviewed the code changes. Just a couple of small comments.
I still wonder about the overlap with the group block, but I'm happy for those who have more experience building themes and content to make a decision on this.
There are now two PRs that look to accomplish to adding a single column option. |
Closing ... Sorry I thought I did it before. |
It would be great if you can help @richtabor on this PR, and help get it merged. |
@paaljoachim Made the suggested changes; I think it's ready to go :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for your work!
The One Column layout (100%) is only 50% on small screens because of the following CSS:
|
Description
This PR does two things:
count
control for columns count to1
from2
.This closes #24055, which will make building more robust column-based layouts easier. Instead of relying on switching between using Columns and Group blocks, single column functionality within a Columns block makes building interesting layouts easier and faster. For one, all blocks within a Group block can't always be aligned fullwidth/wide (Headings and Paragraphs for example), which result in a frustrating experience trying to better align content within columns.
How has this been tested?
Tested in WP 5.5 RC.
Screenshots
Min value set to 1:
Using the one column variation in practice:
New one column variation:
Types of changes
New feature:
count
attribute for the Columns blockChecklist: