Re: [css-flexbox] Behaviour of percentage heights in column direction

On 21 June 2014 05:33, Greg Whitworth <gwhit@microsoft.com> wrote:
>
> Right, I'm not debating that there might be scenarios that authors get themselves into where they want child elements to be resolved against their parent but can't due to recursion where the child is asking its parent for its dimensions but the parent is requesting the same of its children. In that case I agree that nothing should appear [1] (updated fiddle showing this is what occurs in FF/IE/Chrome).
>
> But when you take the example I sent out earlier[2] (based on upon the examples you sent out) this is essentially what is happening:
>
> 1. Flex container is created with flex-direction of column and sets its height to 100px
> 2. The flex item is created and is told to grow to fill its contents (which is 100px)
> 3. The div inside can resolve its height of 100% since the flex item knows its height is 100px
>
> I believe you and I are on the same page regarding what should occur in this situation and it currently is what IE/FF do.
>
> [1] http://jsfiddle.net/6LTwU/6/
> [2] http://jsfiddle.net/6LTwU/5/

Absolutely, the IE/FF behaviour is preferable, and I'd prefer every
browser to match it. The problem seems to be the that definition of a
"definite" size within the spec leaves scope for different
implementations to disagree about what is and isn't definite, based on
how they go about resolving constraints. By the letter of the law, as
laid out in the spec algorithm, it would seem that Chrome is correct
in treating these flex items as indefinite, even if we can see they
effectively *are* definite.

I don't know what the answer is to that. Maybe the algorithm in the
spec needs to be changed to reflect whatever FF/IE are doing with
respect to determining that certain flex items don't need to have
their content measured.

Jon

Received on Saturday, 21 June 2014 15:27:41 UTC