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

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.

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.

~TJ

Received on Wednesday, 23 May 2012 00:31:21 UTC