W3C home > Mailing lists > Public > www-style@w3.org > April 2012

[css3-flexbox] Circular dependency between height of "flex-align:stretch" children & height of flexbox

From: Daniel Holbert <dholbert@mozilla.com>
Date: Mon, 23 Apr 2012 17:04:49 -0700
Message-ID: <4F95EE21.8060309@mozilla.com>
To: www-style list <www-style@w3.org>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Alex Mogilevsky <alexmog@microsoft.com>
Hi www-style,

I just noticed one circular dependency in the spec that could stand some

So -- the definition for 'flex-align: stretch' [1] says that it makes
flexbox items' cross sizes resolve to their line's cross size.

Meanwhile, in the Flexbox Layout Alg section about computing a line's
cross size, we use its items' cross sizes as inputs. [2]

So: when we're computing a line's cross size, what should we be using as
the cross sizes for its auto-sized items with flex-align:stretch?  I see
two possibilities:
  (a) 0 (since it's not resolved yet)
  (b) the "normal" auto size (disregarding the effects of "stretch")

I'd advocate (b), because otherwise, flexboxes whose children are all
auto-sized and have flex-align:stretch (the defaults) would have a cross
size of 0 & not render anything, which is pretty bad default behavior.

Could we clarify this in the spec?  I think the chunk that most needs to
address this is [2]. (where it talks about using the items' cross sizes
as inputs)


[1] Section 8.2, definition of "stretch"

[2] Section 9, step 7.3  ("For remaining flexbox items, find the maximum
of the cross sizes of their margin boxes.")
Received on Tuesday, 24 April 2012 00:05:22 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:57 UTC