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

Re: [css-flexbox] Renaming flex-basis:auto for less confusion

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 11 Nov 2014 16:41:40 -0800
Message-ID: <CAAWBYDBig81y6LphZCwimsRXUw0+0=Hg2oaGYgAc5XO8f=7K3Q@mail.gmail.com>
To: Bruno Racineux <bruno@hexanet.net>
Cc: Daniel Holbert <dholbert@mozilla.com>, Rossen Atanassov <Rossen.Atanassov@microsoft.com>, www-style <www-style@w3.org>
On Wed, Nov 5, 2014 at 12:06 AM, Bruno Racineux <bruno@hexanet.net> wrote:
> On 11/3/14 1:45 PM, "Daniel Holbert" <dholbert@mozilla.com> wrote:
>>The "main-size" rename has only made it as far as Firefox's "beta"
>>release -- it hasn't made it to an official release yet. It's possible
>>we'd discover more breakage on the release channel.
> Why do implementors have to break the previous behavior in the first place?
> Can't browsers implement the new keyword and keep the old 'auto' keyword
> for a while, for backward compatibility reasons, and just issue warnings
> in the console to avoid said breakage if proven a significant problem?

To resummarize:

Previousy, the 'flex-basis' property (accidentally) had two completely
different "auto" values; an "auto" in a *specified* value meant "use
the value of width/height", while "auto" in a *computed* value meant
"auto-size".  This was dumb and confusing, so once we realized it, we
split the two meanings apart.  We had two choices of what to do:

1. Keep "auto => use width/height", and add a new keyword "content"
for "auto-size".
2. Keep "auto => auto-size", and add a new keyword "main-size" for
"use width/height".

#1 is good, because it keeps "auto" consistent with current behavior.
#2 is good, because it means you can use any width/height value in
flex-basis and have it mean the same thing.

We went with #2, because it's what we would have chosen in the first
place had we realized we were doing something confusing. We added a
few wrinkles (using "auto" as the sole value in the 'flex' shorthand
still triggers the "use width/height" behavior) to help with compat,
and hope that we can still keep it, but it's looking chancy.  We may
end up having to do #1 just for compat reasons, unfortunately.

> PS: The spec still refer to 'flex-basis:auto' on the svg Figure 6.

Thanks, will fix.

Received on Wednesday, 12 November 2014 00:42:28 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:45 UTC