Parent has only display: flex
and flex-wrap: wrap
, while children have a fixed height
and width
of 150px
. Which behaves like this:
The height of the parent container expands vertically to facilitate the wrapping children elements.
However, changing the parent to have flex-direction: column
doesn't have the same behaviour horizontally:
Instead of the parent expanding to fit the wrapping content, it's the children elements that get rearranged to be facilitated within the parent element.
The behaviour I'd like to achieve with the vertically wrapping content looks like this:
Well almost like this. Imagine the parent fills the space vertically, and expands horizontally for the wrapping content. A horizontal version of the first gif.
Is this possible with flex-box?