- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 20 Apr 2012 15:52:46 -0700
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: "www-style@w3.org" <www-style@w3.org>
On Fri, Apr 20, 2012 at 3:19 PM, fantasai <fantasai.lists@inkedblade.net> wrote: > Currently the initial value of 'flex' is 'none', which means "use > width/height > and don't be flexible". Wouldn't it make more sense if it was "use > width/height > and be flexible", i.e. 'auto'? No, you want the current defaults, as it makes common cases simpler to understand. Take a simple example, like a two-column layout where the left column should be 200px wide and the right column should take the remaining space. If things were flexible by default, you'd have to do: .container { display:flexbox; } .left { width: 200px; flex: 0; } This seems less intuitive than the current code: .container { display: flexbox; } .left { width: 200px; } .right { flex: 1; } Having to explicitly turn on flexing just seems more natural than having to explicitly turn it *off* in some situations. (In the old world of the flex() function, width:auto computed to flex(1). That was even better - all you had to say was: .container { display: flexbox; } .left { width: 200px; } ...and you were done. I wish I could have salvaged that approach, but alas, it had too many problems.) ~TJ
Received on Friday, 20 April 2012 22:53:35 UTC