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

Tab Atkins Jr. wrote:
> On Tue, May 22, 2012 at 2:20 PM, Anton Prowse <> 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

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.

Anton Prowse

Received on Wednesday, 23 May 2012 08:49:14 UTC