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

[css-flexbox] 'stretch' can shrink flex items - is this intended?

From: Alan Stearns <stearns@adobe.com>
Date: Thu, 20 Jun 2013 18:06:52 -0700
To: W3C WWW Style <www-style@w3.org>
Message-ID: <CDE8F53C.2C85D%stearns@adobe.com>
I'm looking at what happens when a flex item's hypothetical cross size is
larger than the container's definite cross size. There seems to be a bit
of inconsistency (though it's interoperable inconsistency between Blink
and Gecko, at least).

Consider a flex container with max-height of 100px that contains one flex
item (A) with 'height:150px' and another flex item (B) with 'height:auto'
but whose hypothetical cross size from step 7 ends up at 150px. You can
see something similar at [2]

If these items are any alignment other than 'stretch' then they are
consistently 150px tall.

But if the alignment is 'stretch' then A is 150px tall and B is 100px
tall. The 'stretch' value causes a flex item to shrink.

Step 11 of section 9.4 [1] accounts for this, but is this the correct
result? If not, we could add an additional caveat such as, "and its
hypothetical cross size is smaller than the used cross size of its flex
line"

Thanks,

Alan

[1] http://dev.w3.org/csswg/css-flexbox/#cross-sizing
[2] http://codepen.io/astearns/full/nIBdG
Received on Friday, 21 June 2013 01:07:21 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC