Re: [css3-flexbox] Should "align-self:stretch" have any effect on main-size? (i.e. should stretched cross-size be used for establishing main size?)

On 09/11/2013 04:07 PM, Tab Atkins Jr. wrote:
>> Consider this testcase:
>> That testcase contains two examples, which only differ in their
>> "align-items" value on the outermost (vertical) container.
> As far as fantasai and I can tell, the Chrome/Opera behavior is
> currently mandated by the spec.  On the other hand, it's 1am right
> now.  So, would you mind walking through the algorithm, as you believe
> it should be run, and let us know why you think the Firefox behavior
> is correct?

I can if necessary, but first let me just re-pose my confusion about the
Opera/Chrome behavior, to possibly clarify things.

[For simplicity, let's ignore the fact that we've got nested flex
containers -- I'll just be discussing the outermost (vertical) flex
container, and I'll be considering its contents a black box.]

So -- given the following...
   (A) "align-self" doesn't have any effect the algorithm
        until Step 11.

    (B) The flex container's main size (height) has already
        been set before that point -- back in step 4.
        Similarly, flex items' main sizes are set long before
        that point, back in step 6.

... then I don't see any way that a difference in "align-self" could
affect the main-size of a flex container or any of its flex items.

Does that make sense?  Put more concisely still: main-sizes are locked
in *before* we take align-self into consideration, so therefore it
should be impossible for align-self to influence main-size.

Hence my confusion at Opera & Chrome's behavior on my testcase -- they
*are* letting a difference in "align-self" affect the main size of the
outermost flex container and its flex item.

What am I missing?


P.S. The spec has one exception to my premise (A) in step 3 -- "If flex
item has an intrinsic aspect ratio [then maybe do some stretch-specific
stuff]" -- but that doesn't matter here, because we don't have anything
with an intrinsic aspect ratio.

Received on Thursday, 12 September 2013 00:16:30 UTC