W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-flexbox] flex-basis initial value should be 0px

From: Anton Prowse <prowse@moonhenge.net>
Date: Wed, 23 May 2012 04:48:19 -0400
Message-ID: <f0b073a83c97f382e0f2258cd77787a3.squirrel@webmail.moonhenge.net>
To: www-style@w3.org
Cc: "fantasai" <fantasai.lists@inkedblade.net>, "Tony Chang" <tony@chromium.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Tab Atkins Jr. wrote:
> On Tue, May 22, 2012 at 2:20 PM, Anton Prowse <prowse@moonhenge.net> wrote:
>> On 22/05/2012 22:48, Ojan Vafai wrote:
>>> All other things being equal, we should default to the one
>>> that is fundamentally more performant. Auto-sized flex-basis requires
>>> doing
>>> a second layout in many cases.
>>
>> That's what I'm querying, really.  You won't end up with more slower pages
>> just because of the initial value  because the author won't stick with the
>> initial value unless it's actually what they want.  It's not as if
>> 'auto' and '0px' are indistinguishable...
>>
>> On the other hand, I can see that if two values were indistinguishable in
>> common cases then it would make sense to make the more efficient one the
>> default.
>
> They are, in fact, indistinguishable in the case of all the items
> having the same main size, like an image or something, which I expect
> to be pretty common.

OK fair enough, for a toolbar consisting entirely of buttons that are
images without any text, then yes.  (Although many toolbars will also
contain text labels.)

But am I alone in thinking that toolbars etc are not going to be the most
common use of flexbox (by a long shot)?  Unless I'm missing some other
layout system that does it better, IMO flexbox will be predominantly used
to build horizontal navigation menus, with varying-sized text items.

> On the other hand, they merely *seem* indistinguishable for another
> common case, where each of the items has a short amount of text. On a
> large screen, they may seem approximately equal in both situations,
> but on a small screen, the "flex: auto" behavior is better, since it
> won't cause overflow on any of them until absolutely necessary.

For navigation menus, the property you describe is very important, even
when the difference between the natural sizes of the items is not
enormous.


Tony Chang wrote:
> I'm not able to come up with that many use cases where you would want
> auto.

I think the above use case is very important.

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Wednesday, 23 May 2012 08:49:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:54 GMT