Re: [css3-flexbox] multiline

On Tue, Apr 12, 2011 at 5:46 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> IE10 preview has implementation of multiline flexbox (in 2009 syntax).
>
> Since there is an implementation, multiline should get be represented in
> current drafts. It can be lower priority, optional or CSS4, but it should be
> there unless we object to functionality in principle which I don’t think was
> ever the case.
>
> Does it sound reasonable? I can suggest new properties and values to better
> match new syntax.

I don't have a problem with multiline flexboxes, I just thought they
were a complication that didn't need to be addressed quite yet,
because neither of the existing implementations had implemented them.

I don't think the syntax is particularly important; what I would like
to discuss is exactly how the free-space distribution algorithm should
change.

How do you calculate where linebreaks occur?  Presumably, you try to
lay the element out using preferred widths first, break based on that,
then do flex distribution in the measure axis per-line?

What about flexing in the length/extent axis in the presence of
multiple lines, when the flexbox has a definite size in that
direction?  In my original algorithm, I determined the extent of each
line by looking for the element in each line with the largest size in
that axis, and let the last line flex out to fill any leftover space
in the flexbox.  That is, if a flexbox is 100px high, and has two
lines of 40px tall items, the first line would just be 40px tall,
while the latter would flex in a 60px space.  This might not be the
best solution.

~TJ

Received on Wednesday, 13 April 2011 01:07:35 UTC