-
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
Columns Block: Custom column widths can wrap prematurely #17340
Comments
I've just hit this while trying to write custom styles for one-/two-third columns. I'm unsure how to override the inline flex-basis rule because there seems to be no class on the container element identifying how many columns it contains. #15663 (comment) implies there used to be a class like |
@aduth Any thoughts here, is this solved by the new way the widths work? |
I believe this is a duplicate of #18416 (or rather, the inverse, since this one was created first). It was discussed as part of the recent columns revisions in #20169, but a fix was not included, since they were not directly related. Specifically, my comment at #20169 (comment) expands and include possible solution steps:
It's something that's existed previously, but I was still hopeful to be able to include a fix in time for WordPress 5.4. |
Thanks @aduth, let's close this then since the other one has more context. |
Duplicate of #18416 |
Describe the bug
When using custom widths for the columns block (even the preset ones), the columns seem to wrap at odd point (or at least different points than they do when using the default widths). This looks like it's due to the fact the inline styles don't factor in the margin size to the
flex-basis
value -- the values are straight percentages likeflex-basis: 66.66%
inline, but in the stylesheet, the default isflex-basis: calc(50% - 16px)
.I could recreate this in Gutenberg 6.3 and 6.4.
This might be resolved in part by #13363, but I figured it might be worth raising separately.
To reproduce
Steps to reproduce the behavior:
Expected behavior
The custom widths columns will wrap at the same breakpoints as the default column widths.
Screenshots
The two column blocks examples:
The 'odd' wrapping breakpoint (happens between 767px and 601px wide):
And when I manually edit the inline styles to subtract the 16px with
calc( XX% - 16px)
:Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: