- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 6 May 2015 11:06:04 -0700
- To: Daniel Holbert <dholbert@mozilla.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, Mar 3, 2015 at 2:26 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Tue, Mar 3, 2015 at 10:13 AM, Daniel Holbert <dholbert@mozilla.com> wrote:
>> On 03/03/2015 09:25 AM, Tab Atkins Jr. wrote:
>>> I literally checked in the fix for that yesterday, it's not showing up
>>> in the spec for some reason. I'll check this out.
>>
>> Looks like it made it in now. ("If the item’s computed flex-basis is definite"...)
>>
>> I don't agree with this change, though.
>>
>>> (Right now the spec only pays attention if 'width' is definite and
>>> "flex-basis:auto". I'm 95% certain this was an oversight, and having
>>> a definite 'flex-basis' should have the same effect.
>>
>> I don't think it was an oversight -- the distinction is important.
>>
>> With your change (allowing definite values in "flex-basis" to influence resolved min-width:auto), this will allow shrinkage below the min-content width (and cause overflow) when authors specify e.g. "flex: 1", which would make "flex: 1" much more dangerous to use.
>>
>> As I recall, the whole idea of shorthands like "flex: 1" is that you can make your items grow equally from 0, with a guarantee that each item will be large enough to not have content overflowing. This change breaks that, and would likely cause backwards-compatibility headaches as a result.
>
> Ugh, you're right. That's why I was only 95% sure. >_<
Okay, fixed. We reverted the the offending change, and fixed it
*properly* by removing the requirement that 'flex-basis' be "content".
If there is a specified size that's smaller than min-content, it
should definitely win (this was already the case for "transferred"
sizes, but I was being weird about specified size).
Quick use-case: <img src=foo width=40> If intrinsic width is 100px, an
author would still expect that it be allowed to shrink to 40px by
default, regardless of whether flex-basis was "content" or some other
length, same as an image with an intrinsic size of 40px.
~TJ
Received on Wednesday, 6 May 2015 18:06:51 UTC