RE: Flexbox Draft, with pictures!

> -----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