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

On Mon, Apr 23, 2012 at 5:04 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> Hi www-style,
>
> I just noticed one circular dependency in the spec that could stand some
> clarification.
>
> 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)

Yup, it should be (b).

fantasai and I are right now rewriting the layout algorithm to ground
it in extreme specificity, and we're finding that all the layout
algorithms are giant piles of hands, blindly waving.

~TJ

Received on Tuesday, 24 April 2012 00:51:53 UTC