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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 2 Mar 2015 16:16:32 -0800
Message-ID: <CAAWBYDAgVD54x2dti+UGwFZhK97-P=hNGsEz28aT+wmkhU0EOw@mail.gmail.com>
To: Philip Walton <philip@philipwalton.com>
Cc: Daniel Holbert <dholbert@mozilla.com>, fantasai <fantasai.lists@inkedblade.net>, Greg Whitworth <gwhit@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Feb 25, 2015 at 7:13 PM, Philip Walton <philip@philipwalton.com> wrote:
> On Tue, Feb 24, 2015 at 11:16 AM, Daniel Holbert <dholbert@mozilla.com>
> wrote:
>> I prefer the pre-August behavior on this point, because min-content sizes
>> aren't really a useful lower-bound for flex items with aspect ratios. These
>> flex items *can* shrink (honoring their intrinsic aspect ratio) below their
>> min-content size, without overflowing.
>
> This makes a lot of sense to me, and I think the example is quite
> compelling. Given an <img> flex item whose only CSS declaration is `flex: 0
> 0 50px`, it seems quite strange (and unexpected) to have its rendered size
> be 300px wide/tall.

That doesn't happen.  The rules for min-width:auto specifically take
into account if the item has a definite flex-basis (or it has
flex-basis:content and a definite width).

As far as we can tell, the current spec gives the best of all worlds
here - if you don't specify anything special, images won't shrink
below their intrinsic size, but if you do specify an explicit size,
they're allowed to shrink down to that.

~TJ
Received on Tuesday, 3 March 2015 00:17:19 UTC

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