W3C home > Mailing lists > Public > www-style@w3.org > November 2015

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

From: Daniel Holbert <dholbert@mozilla.com>
Date: Thu, 5 Nov 2015 11:17:05 -0800
To: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <563BAB31.2000602@mozilla.com>
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.)

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:58 UTC