Re: [css-flexbox] What to do with an item's height when max-height is applied to the flex container

On Mon, Apr 21, 2014 at 11:43 AM, Greg Whitworth <> wrote:
> We ran into an interesting interop issue where if you set a flex container
> with a max-height, Firefox and IE set the flex-item height to the height of
> the max-content of the items, while Chrome sets the max-height of the
> flex-item to the suggested max-height applied to the flex-container. The
> spec is not completely clear on what to do in this case so I would like to
> reach consensus on what to do in this case:
> A)     Have the flex items inherit their height from the flex-container’s
> constraints if not directly set (Chrome)
> B)      Resolve their height against the largest flex-item (IE, Firefox)
> Here is a fiddle of the repro:

Can you point out what part of the spec seems ambiguous on this point?
 It seems clear to me:

1. In step 8, the flex container's cross size is indefinite, so we
can't use the first clause.  We fall to the second one, which sizes
the flex line to the largest hypothetical cross size among its items

2. In step 11, the flex item is stretched and auto-sized and meets the
other criteria, so it gets set to the size of the flex line (150px).

3. In step 15, the flex container is set to the size of its flex line
(150px), but clamped by its min/max properties, so it gets set to
100px. (This is FF's behavior, and probably IE's from your

Is there something I've missed that makes this less cut-and-dry?


Received on Monday, 21 April 2014 19:50:50 UTC