Re: [css3-flexbox] alignment test

On Mon, Dec 12, 2011 at 8:38 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> ± Sent: Monday, December 12, 2011 3:52 PM
> ±
> ± On Mon, Dec 12, 2011 at 3:26 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ± > Can I break this question in two:
> ± >
> ± > 1) As far as what 2009 spec actually says, is my test and expected
> ± > behavior correct? Such as do margin work the same way in horizontal
> ± > and vertical box, is "center" a "true center" etc.? Regardless of what
> ± > we want to do, I want to be sure I am reading that correctly
> ±
> ± I'm not sure if it's accurate wrt the actual 2009 spec text; I haven't deeply internalized
> ± the relevant details.  That's irrelevant, though, because the two existing *implementations*
> ± of said spec do not match your testcases.  Thus, there's no need, even theoretically, to
> ± match whatever behavior the spec might be interpreted to mandate.
>
> 2009 alignment spec is not irrelevant until we have an agreed new spec that is detailed enough to implement. Whatever is coded up in partial implementations is not a spec.

The only reason to care about specs is to help achieve interop.  The
only reason to care about *old* specs is if you're trying to be
feature-compatible to ease migration from existing content, and in
that case what you *actually* care about is the de facto standard
established by implementations, since that's what the existing content
was authored against.

According to the de facto standard of the Firefox and WebKit
implementations, 2009 Flexbox doesn't have flexible margins.


> Also, the new spec used to have the same text, which I copied from 2009 spec because:
>
>        - at Seattle F2F you insisted that auto margins taking priority
>          over alignment is a good thing,
>        - at the same time we agreed that it is important that alignment
>          works the same way in flexbox and in grid
>        - later we have observed that 2009 spec describes exactly the behavior
>          we agreed on in Seattle.
>
> You have later removed the alignment formulas from the new spec (with intention of moving detail to layout algorithm). You have never objected to the text you removed, and there was no WG resolutions on alignment that I know of, so up until this thread I was assuming that there is no change and consulting 2009 spec for alignment is as good as anything.

The first point isn't quite correct.  I wanted consistency within
Flexbox and with Grid.  That could be accomplished either by making
margins flexible and dropping flex-align (and doing something similar
with Grid), or by dropping flexible margins and using flex-align, or
by having both flexible margins and flex-align.

The first option isn't great (no baseline alignment), and Grid didn't
seem like it wanted to match, so it's out.  The second is fine.  The
third is unnecessary - simple flexible margins as we've discussed
offer no benefits over flex-align (as demonstrated by your testcase
rendering).  So, I adjusted the spec for the second one, which I
believe is what you wanted all along.  ^_^


> And that is exactly the reason I have built this test. If it doesn't look like what we want it either (a) means that we didn't realize what we wanted or (b) I don't understand the spec I was reading.

Nah, I think it's just a bit of crossed communication.  We both
assumed the other side was more firmly set in their initial position
than they were.


> With that in mind (and before I start discussing relevance of my implementation), can I get the answer to my first question - is the picture I sent a correct interpretation of the spec I was consulting with?

Based on my reading just now, yes, it is.  Neither existing impl
follows it, though.

~TJ

Received on Wednesday, 14 December 2011 02:48:42 UTC