- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 13 Apr 2011 10:17:22 -0700
- To: Alex Mogilevsky <alexmog@microsoft.com>
- Cc: www-style list <www-style@w3.org>
On Tue, Apr 12, 2011 at 7:04 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote: >> 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. > > I use exactly same flexing algorithm in both directions. > If 'box-align' is 'stretch', each line is considered to have positive flex of 1 (there is no negative flexing for lines, we don't want them to overlap) > If 'box-align' is any other value, lines have flex of 0 and are packed in the direction of alignment ('box-align' is automatically mapped to transverse packing). Ah, okay, so the question of what to do with leftover space in the flexbox is irrelevant, because if you pack the lines to the top of the flexbox, the items are also packed to the top of each line, and you can't tell if the last line is taller or if there's just unused space in the flexbox. > I don't particularly like reusing one property for two settings, it really should be a separate property > > flex-line-pack: before|middle|after|justify > > (with same behavior, unless we can think of something better) Yeah, something like this would be good. You need another value to indicate that the lines should flex themselves, but otherwise it's good. When you have box-align:stretch, and thus flex the lines, what's the preferred height for the lines? 0, or the largest height among the items in each line? ~TJ
Received on Wednesday, 13 April 2011 17:18:09 UTC