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

On Sat, May 17, 2014 at 2:55 AM, Greg Whitworth <gwhit@microsoft.com> wrote:
> Hello,
>
> We came across an interesting issue regarding the min-height of a flex item[1] when the flex item has an intrinsic aspect ratio. We are setting the flex base size according to the aspect ratio but the hypothetical main size ignores it by applying the min size property. Because of this, I suggest rewording section 4.5 from:
>
>    # On a flex item whose overflow is visible
>
> to this:
>
>    # On a flex item whose overflow is visible and does not have an intrinsic aspect ratio.

That's definitely not the fix that we want, because one of the main
drivers for the "min-width: auto;" behavior was items with intrinsic
aspect ratios (preventing <img>s from shrinking), but your issue is
valid.

The problem is that the Sizing spec doesn't handle elements with
aspect ratios well when talking about min-content size.  That's the
part that needs to be fixed to have this work properly, both in
Flexbox and everywhere else that talks about the min-content size of
an element. 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.

~TJ and fantasai

Received on Monday, 19 May 2014 14:22:49 UTC