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

On 08/11/2014 12:32 PM, Daniel Holbert wrote:
> On 07/01/2014 09:01 AM, Tab Atkins Jr. wrote:
>> Minutes link: <http://lists.w3.org/Archives/Public/www-style/2014Jun/0107.html>
>>
>> fantasai and I were to propose a new keyword for the "use
>> width/height" behavior, leaving ''auto'' to mean a flex-basis of auto.
>> To avoid breaking content, the 'flex: auto' shorthand declaration
>> would continue to mean what it does, expanding to 'flex: 1 1
>> main-size', and we're relying on the assumption that hardly anybody is
>> explicitly specifying the longhand 'flex-basis: auto' and relying on
>> it to pull in a non-auto width/height value.
>>
>> We suggest ''main-size'' for the new keyword.
> [...]
>> This is also provisional based on whether there's too much
>> "flex-basis:auto" code in the world that's paired with a non-auto
>> 'width' value.
>
> Heads-up: I've implemented this "auto" --> "main-size" renaming in
> Firefox Nightly[1] builds since Friday, but it appears to break the
> sizing of the Google searchbar[2] at the top of various Google
> properties (Google search-results pages, gmail, calendar, news, etc).
> [...]
> Anyway -- we've contacted Google about this issue and I'm hopeful that
> they'll take action reasonably soon (adding a "main-size" version of the
> above-quoted "flex" decls).  But this might portend badly for this spec
> change being web-compatible.
>
> (Fortunately, I haven't heard of any other content that's been broken by
> this change, though it's only been a few days.)

Hi Daniel!
We discussed this issue at the Sophia F2F two weeks ago.
We didn't conclude to change anything at the moment, but
we wrote in the issue and an alternative solution that
doesn't impact back-compat. We're going to keep this open
during the last call period in order to collect feedback
from implementers (like you).
   http://dev.w3.org/csswg/css-flexbox/#flex-basis-property
Microsoft also plans to do a back-compat evaluation.

I think if the change hadn't been implemented already,
I'd've pushed for the alternative solution, but we wanted
to be sensitive to where implementations are currently at.

Here's the full text of the issue:

   | This value was originally named auto, but that was
   | problematic because it left us with no keyword to
   |represent an automatic flex basis. There were two
   | options for fixing this:
   |
   | 'auto' for automatic sizing; 'main-axis' for size lookup
   |    The advantage of this is primarily that auto means
   |    “automatic” both when it is specified for 'flex-basis'
   |    and when it is pulled in from width/height. It has
   |    the disadvantage (due to back-compat concerns) that
   |    the 'flex' shorthand had to be tweaked to expand
   |    'flex: auto' to 'flex: auto main-size' rather than to
   |    'flex: 1 auto'. It is the currently-implemented option,
   |    but may be unshippable due to back-compat constraints.
   |
   | 'auto' for size lookup; 'content' for automatic sizing
   |    The advantage of this is that it will not break
   |    existing content: a flex-basis keyword for automatic
   |    sizing did not exist in the original CR, so this
   |    option adds a new keyword but does not rename existing
   |    functionality. It therefore avoids the
   |    'flex: auto' ≠ 'flex: 1 auto' inequality.
   |
   | The CSSWG is waiting for feedback from implementers on this issue.

~fantasai

Received on Wednesday, 24 September 2014 20:39:04 UTC