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

Re: [css-flexbox] min-height on flex items that have an intrinsic aspect ratio

From: Daniel Holbert <dholbert@mozilla.com>
Date: Mon, 2 Mar 2015 15:55:13 -0800
To: fantasai <fantasai.lists@inkedblade.net>, "Tab Atkins Jr." <jackalmage@gmail.com>, Greg Whitworth <gwhit@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
message-id: <54F4F861.3010704@mozilla.com>
On 02/24/2015 11:16 AM, Daniel Holbert wrote:
> Hi fantasai/tab/Greg,
> I've just realized that the "expanding"/"more comprehensive" rewrite in August 2014 here actually changed behavior in a pretty substantial way.
> Importantly:
>  - *Before* this commit, it was clear that min-content size is *ignored* when resolving "min-width:auto", for flex items that have an intrinsic aspect ratio.
>  - But after this commit, min-content size is *needed* & used when resolving "min-width:auto" for these flex items. (It's just clamped by transferred min/max properties in the other direction, and if there happens to also be a definite cross-size property, that can push the min-size lower.)

> Was this behavior-change intentional? (making min-width:auto depend on min-content size, for items w/ intrinsic aspect ratios)

Following up here -- as noted elsewhere[1], I discussed this issue with Tab/fantasai/Greg/Rossen today, and confirmed that the spec behavior-change here *was intentional*.

There was a problem with the previous behavior (allowing images to shrink to 0 by default). If you had 2 unstyled flex items -- an <img> and a paragraph of text -- then the paragraph will have a large hypothetical size (the length of its text laid out on a single line), so we'll be forced to shrink both items. And if the <img> can shrink below its intrinsic size *by default*, then it'll do so in this scenario, and that's unintuitive. The amount that it shrinks is also a bit arbitrary, too -- it depends on how much we overflow, which depends on how much text we've got in the other flex item.)

So, images won't shrink below their intrinsic sizes *by default* (but this can be overridden in various ways as described in the spec).

So, we need to adjust Firefox to match the updated spec-text. Here's my Firefox bug on this for reference:


[1] https://lists.w3.org/Archives/Public/www-style/2015Mar/0024.html
(This issue is labeled "(3)" in that post.)
Received on Monday, 2 March 2015 23:55:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:29 UTC