Re: [css-flexbox][css-grid] Percentages resolving against definite max-height

On 11/05/2015 11:01 AM, Daniel Holbert wrote:
> In Firefox, this happens between Step 5 ("Collect flex items into flex
> lines") and Step 6 ("Resolve the flexible lengths of all the flex items").
> https://drafts.csswg.org/css-flexbox-1/#main-sizing

To be clear, by "this happens", I mean "we resolve the main size of the
flex container" (to the min/max-clamped size of the longest line, as
noted in my previous email).

You were mostly asking about the flex items, though.  So: the resolved
main size influences the size of the flex items in the next step, Step
6, "Resolve the flexible lengths of all the flex items".  There, we find
out that we don't have enough space in the flex container for each flex
item to take on its ~1em hypothetical size.  So, we have to shrink them
(per their default "flex-shrink: 1") until they fit.

(Note that if you set "flex-shrink: 0" on the items, or if you remove
"min-height:0", then they don't shrink.)

~Daniel

Received on Thursday, 5 November 2015 19:17:37 UTC