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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 24 May 2012 10:45:08 -0700
Message-ID: <4FBE73A4.90001@inkedblade.net>
To: Sylvain Galineau <sylvaing@microsoft.com>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Ojan Vafai <ojan@chromium.org>, Tony Chang <tony@chromium.org>, "www-style@w3.org" <www-style@w3.org>
On 05/23/2012 03:42 PM, Sylvain Galineau wrote:
> [Tab Atkins Jr.:]
>>
>> On Wed, May 23, 2012 at 1:52 PM, Sylvain Galineau<sylvaing@microsoft.com>
>> wrote:
>>>
>>> [Ojan Vafai:]
>>>
>>>> This is the part I disagree with. When we break an edge case visually,
>>>> it's relatively straightforward for a developer to look up the
>>>> documentation for flexbox (e.g. on MDN) and figure out how to fix it.
>>>> On the other hand, when the performance is slow, it's almost
>>>> impossible to gain insight into what's causing it to be slow. As a web
>> developer, you're most likely to throw your hands up and assume the UA
>> just hasn't optimized flexbox, at which point you'll either not use
>> flexbox or live with your site being slow to load, both of which are
>> unacceptable.
>>>
>>> Second layout passes are never fun but are we talking about an impact
>>> that will be noticeable to your average author building a nav bar? How
>>> are they going to notice it i.e. what's the baseline? Would they be able
>> to tell the flexbox version is visibly slower than the built-with-divs-
>> and-duct-tape version?
>>
>> Ojan and Tony are mostly concerned about the speed effect on Flexbox used
>> for page layout, where the contents of the flex item might be "the entire
>> body of the page".  The effects on a nav bar are obviously small enough to
>> probably be completely ignorable.
>>
> Fair. It will always hurt at some level. Though I'd still like to get a concrete
> idea of what kind of impact we're talking about. Has this been measured already
> or are we guessing?

Enforcing min-content by default on Flexbox shouldn't be more of a performance
problem than it is on tables, and that's a well-established layout mechanism
that's already used for entire pages.

Wrt discoverability of how to make it faster, we can put a few examples of
"best practices" in the spec, one of them showing how to use absolute flex
for a page layout in conjunction with min-width: 10em; or something, and
explain why that is better. Daniel Glazman already asked for us to do some
significant editorial work to make the spec more understandable to authors;
this would be part of that.

~fantasai
Received on Thursday, 24 May 2012 17:45:47 GMT

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