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
[css-flexbox] new flex wrap value that changes the flex direction #6366
Comments
|
So if the items don't fit into the row, it changes into column direction. But what if they don't fit into the column either? Do they wrap into a 2nd column? |
I don't think so. It would only change the flex direction from Further behavior would probably be too complicated. |
|
I have a (for me) very common use case for that as well: I often have a horizontal navigation in a footer with an undefined amount if links in there. What I usually want then is that as soon as the first link does not fit into the row anymore, I want the navigation to become a column. Using |
|
Would be amazing to be able to do this in pure CSS. Our Button Group component in Spectrum swaps orientation from horizontal to vertical when space is limited, and we currently have to implement this with some tricky JavaScript. However this has the downside that the initial layout is potentially incorrect on page load before the JS has executed. I agree with the previous commenters that an extension of |
|
Related: https://ishadeed.com/article/flex-wrap-detect/. This proposes a |
|
Yes .flexbox:wrap {
flex-wrap: nowrap;
} |
I couldn't find a way to style parent & child, so that it behaves like Version 1 & 3 depending on the content:
The content is unknown, could be "A", "B" & "C" or "A", "B" & "VERYLONG", … could be more than 3 elements. This eliminates media width queries.
I thought of something like this:
The text was updated successfully, but these errors were encountered: