RE: [css3-flexbox] alignment test

Actually Tab wanted margin alignment to work, right Tab? It is not in the spec currently but so far I am sure it is our intent is to provide exactly same behavior as in old spec (that's why I link to the old spec), just word it in a more readable way.

You are right, margin alignment duplicates per-item alignment. Actually considering that, I think we should consider making alignment apply to flexbox as in old spec. It is often more convenient to apply alignment once for all items, and the cases when per-item alignment is needed can be handled with margins. Something for WG to discuss.

From: tc@google.com [mailto:tc@google.com] On Behalf Of Tony Chang
Sent: Friday, December 02, 2011 3:04 PM
To: Alex Mogilevsky
Cc: www-style@w3.org list; Tab Atkins Jr.; John Jansen; Arron Eicholz; Rossen Atanassov
Subject: Re: [css3-flexbox] alignment test

Oh wait, it looks like you're talking about the old flexbox spec.  Disregard my email.
On Fri, Dec 2, 2011 at 3:00 PM, Tony Chang <tony@chromium.org<mailto:tony@chromium.org>> wrote:
The current version of the spec doesn't say what to do with margin: auto, although previous versions said to treat it as flex(1).  We have been treating margin: auto as margin: 0.

I think the reason Tab gave for removing the margin:auto behavior was that it was redundant with what flex-align already provides.


On Fri, Dec 2, 2011 at 2:31 PM, Alex Mogilevsky <alexmog@microsoft.com<mailto:alexmog@microsoft.com>> wrote:
Trying to understand what exactly is expected from flexbox alignment, I came up with a test that is exercising all alignment/size/margin combination I could think of. The new spec (http://www.w3.org/TR/css3-flexbox/#flex-align) is not yet specific enough, but I am pretty sure we have agreed that we will want same behavior as specified in 2009 spec (http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment), at least I am not aware of any stated differences.

Attached is the test, including prefixed syntax for implementations I know about
(-ms-box-, -moz-box- and -webkit-box-) and a screenshot of what I expect to see.

Is my understanding correct?

Note that as far as I can read the 2009 spec, it does "true center" both when aligned with margins and when aligned with "box-align:center". Not sure if it was intentional but it is what it defines, doesn't it?

Also note that the test includes all cases in horizontal and in vertical writing modes. I only included a screen shot for horizontal, writing mode is there for completeness but it doesn't make any difference for flexbox algorithms.

Thanks
Alex

Received on Saturday, 3 December 2011 00:36:00 UTC