- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 6 Jun 2012 11:23:48 -0700
- To: Alex Mogilevsky <alexmog@microsoft.com>
- Cc: Morten Stenshorne <mstensho@opera.com>, Daniel Holbert <dholbert@mozilla.com>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Wed, Jun 6, 2012 at 10:26 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote: > ± From: Morten Stenshorne [mailto:mstensho@opera.com] > ± Sent: Wednesday, June 06, 2012 1:06 AM > ± > ± As an implementor, I have no strong opinions (they are obviously equally > ± easy to implement), but apart from that, I must say I like things that are > ± clear and stupid, and at least not smarter than me. :) > > Exactly what I feel as an author. I prefer consistent over convenient too. > > ± Another issue being discussed in this thread, regarding the case where only > ± one <number> being supplied in the 'flex' property: I prefer that it apply > ± to both growing and shrinking, FWIW. > > Now that "0 1 auto" has been voted in and special case for "flex:0" dismissed (reasonable, considering the new default), I think there is still a way to make the whole thing at least somewhat sensible: > > 1) initial: "flex:0 1 auto" > ("flex-basis:auto; flex-grow:0; flex-shrink:1;") > > 2) defaults in flex shortcut match initial values: > "flex:auto" == "flex:0 1 auto" > "flex:1" == "flex:1 1 auto" > "flex:0" == "flex:0 1 auto" > "flex:0 0" == "flex:0 0 auto" > "flex:1 0" == "flex:1 0 auto" > "flex:100px" == "flex:0 1 100px" > "flex:0px" == "flex:0px" > > Yes, "relative flex" is a little easier to get: > > .flex0 { flex:0 } > .flex1 { flex:1 } > > While for "absolute flex" you have to say you want to drop flex-basis to 0: > > .flex0 { flex:0 } > .flex1 { flex:1 0px } > > But that's ***OK*** -- it is still easy to set flex-basis to whatever you want it to be, but default of "0px" really makes no sense for inflexible items, which have been the source of endless issues. I strongly object to this. We've had an understanding for a year+ that both absolute and relative flexing should be easy to use, which means doable with a single value. Changing this now would go against that long-held understanding, and make it easier to accidentally opt into relative flex when you want absolute. Making absolute flex take more effort than relative (specifically, requiring authors to specify a basis of 0px) was identified as a major usability pitfall with the 2009 model. We've been working around that problem since, and I don't want to go back on it. ~TJ
Received on Wednesday, 6 June 2012 18:24:37 UTC