W3C home > Mailing lists > Public > www-style@w3.org > August 2014

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 19 Aug 2014 13:43:15 -0700
Message-ID: <53F3B6E3.50903@inkedblade.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, Greg Whitworth <gwhit@microsoft.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 07/01/2014 10:34 AM, Tab Atkins Jr. wrote:
> On Mon, May 19, 2014 at 1:26 PM, Greg Whitworth <gwhit@microsoft.com> wrote:
>>> On 05/19/2014 07:21 AM, Tab Atkins Jr. wrote:
>>>> For example, in a shrink-wrapped table cell, if the height of the
>>>> image is specified as half its intrinsic height, its width
>>>> contribution to the table should likewise be half its intrinsic width.
>>>
>>> Sorry, I gave a bad example here. A more accurate example would be a
>>> 100x100 image with a specified width of 50px and a specified height of 'min-
>>> content': the resulting height should be 50px, similar to how a paragraph's
>>> height is (in a more sophisticated relationship) the result of applying its
>>> intrinsic constraints to a specified width.
>>>
>>
>> Thanks for the feedback but I don't think that that solves the problem in this particular case because the width provided was not definite. What should happen to that same 100x100 image if the width is set to 100% with a height of 'min-content'? Your example is currently how IE behaves, if you take the fiddle example[1] from before and apply a definite width its aspect ratio is maintained due to the fact that 4.5 gives us that out and we uphold section 9.2.3B.
>
> Circling back here, we think we fixed this back in May, by adding the
> following lines to the "min-width/height: auto" requirements:
>
> # <li>if the item has no intrinsic aspect ratio, its <a>min-content size</a>,
> # <li>if the item has an intrinsic aspect ratio,
> #   the width (height) calculated from
> #   the aspect ratio and any definite size constraints in the opposite dimension
>
> Does this work? We think it does.

We've gone ahead and expanded this out to be more comprehensive. The
new text is at
   http://dev.w3.org/csswg/css-flexbox/#min-size-auto

(Note, we also incorporated handling of 'width' and 'height' to avoid
surprises when the author specifies a size smaller than the min-content
size.)

~fantasai
Received on Tuesday, 19 August 2014 20:43:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:37 UTC