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

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.

~TJ

Received on Tuesday, 1 July 2014 17:35:27 UTC