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

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.

~Daniel

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