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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 19 May 2014 23:21:58 +0900
Message-ID: <CAAWBYDAJj9p0_3G8dAF7KnQpMsKvgDZJpp7-gSqoCnFA2xgDCg@mail.gmail.com>
To: Greg Whitworth <gwhit@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
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

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