[css-flexbox]

I have a suggestion for flex box. Can there be a max-lines or max-rows
attribute? What if I have a flex box (justify-content:space-between) with
*n* flex items whose widths are determined by the text inside. As the
browser shrinks to the point where there is no more space in between the
flex-items, you want it to wrap to two rows of items. No problem, just
apply flex-wrap:wrap,...but then when you shrink the flexbox further, once
this double rowed flexbox has no more space in between the flex-items, you
do not want it to wrap to three rows---rather you want it to begin to
shrink the flex-items themselves. You can't change to flex-wrap:nowrap
because then it will go back to one row. The only option is to use
javascript.

This problem could be solved with the following elegant style:

..container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-rows:2;
}

Thanks!

Received on Wednesday, 17 September 2014 15:52:18 UTC