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

Re: [css-flexbox] Fixed mistakes in min-size:auto section, please review

From: Daniel Holbert <dholbert@mozilla.com>
Date: Mon, 18 Aug 2014 15:55:54 -0700
Message-ID: <53F2847A.3030500@mozilla.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
On 08/18/2014 03:28 PM, Tab Atkins Jr. wrote:
> I changed it to "the used
> 'flex-basis', if the computed 'flex-basis' was "auto",". This is dumb,
> because it's stopped paying attention to the flex-basis when it's just
> a definite length.

I don't think that was dumb -- I saw it as *correct* that min-size:auto
shouldn't pay attention to definite "flex-basis" values.

Consider e.g.
 <div style="flex: 1">Text</div>

...which is equivalent to:
 <div style="flex: 1 1 0%">Text</div>

The goal of "min-width:auto" is to enforce a minimum size on that flex
item -- its min-content width -- despite the fact that it has an
explicitly specified flex-basis of 0.  So if space is constrained, it
should get at least enough width to fit its contents, even if that's a
bit more than its "flex:1" would merit.

But if its flex-basis:0% is one of the sources for resolving
min-width:auto, then we wouldn't do any such clamping here, and that
use-case would break.

Received on Monday, 18 August 2014 22:56:21 UTC

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