W3C home > Mailing lists > Public > www-style@w3.org > June 2010

RE: Flexbox Draft, with pictures!

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Tue, 1 Jun 2010 18:11:27 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: David Hyatt <hyatt@apple.com>, www-style list <www-style@w3.org>
Message-ID: <5258A1A783764C478A36E2BC4A9C497E0C216E@tk5ex14mbxc105.redmond.corp.microsoft.com>
> -----Original Message-----
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> Sent: Tuesday, June 01, 2010 10:51 AM
> On Tue, Jun 1, 2010 at 10:13 AM, Alex Mogilevsky <alexmog@microsoft.com>
> wrote:
> > Actually I don't see anything difficult there.
> > - "pack" has any effect only after any flex distribution is exhausted and
> there is still empty space.
> Does that change the behavior of a "width:auto;margin:0;" child, which right
> now is treated like "width:1fl;margin:0" and automatically expanded as much
> as it can be?

Not sure what "that" refers to, but either way if there is no extra space there is no pack.

I don't understand however why "width:auto" is same as "width:1fl". 'auto' is simply shrink to fit, and '1fl' consumes additional space, doesn't it?

> > - "align" has to deal with non-zero margins and padding already; if those are
> calculated using flex or anything else it doesn't change any of align code.
> Would this have any effect if any of the vertical lengths were flexible, or does
> it only have an effect when the total height of the margin box is inflexible
> (either because all the vertical lengths are inflexible, or if all of the flexible
> ones have hit their maximum size)?  That is, what effect does box-
> align:center have on a child with "margin: 0 0 1fl 0;" (which aligns the child to
> the top).
> Similarly, does box-align:stretch change the behavior of height:auto?
> (Again, right now height:auto computes to 1fl if it's the only flexible vertical
> length on the box, or 'fit-content' otherwise.)
> I personally doubt the additional complexity in the model to handle
> pack/align alongside flex lengths is worthwhile, especially if you have to avoid
> using flexible lengths at all for them to have a noticeable effect.

You are right, simple alignment is redundant when you can do the same with auto margins. But you can't model baseline alignment with flex units, can you? And didn't you want a combination of 'stretch' and 'baseline' to work too?

As far as combinatorial complexity, adding "fl" to margin calculation seems to not complicate alignment any more than any other margin. First all relevant margin are calclulated, then margin boxes are aligned. This works the same with any other alignment (e.g. in <center> element -- although deprecated, every browser has to implement it).

Received on Tuesday, 1 June 2010 18:15:35 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:35 UTC