W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: [css3-flexbox] intuitivity and width computation rules

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 13 Jan 2011 01:58:42 -0500
Message-ID: <4D2EA2A2.3070407@mit.edu>
To: Sylvain Galineau <sylvaing@microsoft.com>
CC: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
On 1/13/11 12:44 AM, Sylvain Galineau wrote:
> Well, like Daniel, I thought that specifying box-flex meant I didn't have to set width. In my case at least, what may have contributed to this were the many super-simple examples and testcases which mostly involve boxes with very little or no content - very commonly the "1", "2", "3" flex sample seen in almost every blog post on the topic [1] - where you don't run into this situation.
>
> I wouldn't be surprised if others end up assuming the same i.e. setting box-flex 2, 1, 1 does not require setting widths to 50%, 25%, 25%. And their reaction to being told they have to will often be "well, what's the point then ?"

The point is when you have boxes which you'd like to have some widths 
that _don't_ add up to the container's width, and to have any width left 
over distributed to those boxes in some specified ratios.

If you just want to specify some widths and width ratios and have the 
sum of the things you specify add up to the container's width, CSS 
already provides the tools for that with calc() and percentage widths.

So as I said, it really depends on the problem you're trying to solve. 
Now perhaps the argument is that the problem box-flex is trying to solve 
is an edge case that doesn't matter and that it should be removed from 
the spec entirely.  I have no judgment on this, since my UI design 
experience is very limited.  It's worth talking to people who actually 
do UI design to see whether that functionality is useful enough.

-Boris
Received on Thursday, 13 January 2011 06:59:17 GMT

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