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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 18 Aug 2014 16:08:38 -0700
Message-ID: <CAAWBYDB9uXpYpbx+4ogKSV+9arWLeOOBQB_a0u9y3qxXrbN7Hg@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style list <www-style@w3.org>
On Mon, Aug 18, 2014 at 3:55 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> 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.

Hm, you're right.  I was operating under the assumption that
"flex-basis: 100px;" and "flex-basis: main-size; width: 100px;" should
be absolutely identical in all circumstances, but I guess this is a
situation where they can have different behavior.  I'll remove the
first bullet-point, then.

~TJ
Received on Monday, 18 August 2014 23:09:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 18 August 2014 23:09:25 UTC