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

Re: [css3-flexbox] ED updated: algorithms and 'flex' property

From: Tony Chang <tony@chromium.org>
Date: Tue, 28 Feb 2012 16:59:39 -0800
Message-ID: <CAL-=4P18yXZnkSxaN8rUruzNCiTMsCJo-iBJ9ZD28m_33T7kiw@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org list" <www-style@w3.org>
On Tue, Feb 28, 2012 at 4:06 PM, Alex Mogilevsky <alexmog@microsoft.com>wrote:
>
> My preference BTW, just in case I haven't said before, to not have
> preferred size in 'flex' property at all. It is there because "flex:1;
> width:0;" is supposedly not intuitive.
>

Anecdotally, in helping debug old flexbox designs, the main confusion was
with percentage sizes and vertical flexboxes.  Often times there would be
code with flex: 1; height: 50%; and people would be confused why their
vertical flexbox doesn't fill half the available space.  Having separate
properties makes it hard to know the order in which flex and width/height
evaluate.

Perhaps "flex:1; flex-preferred-size:0; width:<ignored>;" would work better
> - it is more verbose, but totally clear and doesn't involve funky defaults.


I like this idea.  To expand on it further, we would have three separate
properties (e.g., positive-flex, negative-flex, flex-preferred-size) and
flex would just be a shorthand.  All would default to 0.  If we're not in a
flexing context or if positive flex and negative flex are both 0, we would
use width/height.  We only use flex-preferred-size if we have a positive or
negative flex value.
Received on Wednesday, 29 February 2012 01:00:07 GMT

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