W3C home > Mailing lists > Public > www-style@w3.org > September 2013

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

From: Daniel Holbert <dholbert@mozilla.com>
Date: Wed, 11 Sep 2013 17:15:59 -0700
Message-ID: <523107BF.7050101@mozilla.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
On 09/11/2013 04:07 PM, Tab Atkins Jr. wrote:
>> Consider this testcase:
>> http://people.mozilla.org/~dholbert/tests/flexbox/can-stretch-affect-main-size-1.html
>>
>> 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?

~Daniel

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC