- From: Alex Mogilevsky <alexmog@microsoft.com>
- Date: Thu, 14 Apr 2011 00:22:33 +0000
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- CC: www-style list <www-style@w3.org>
I don't like the idea of width/height taking space-separated lists. I would rather have a flex function. Given a choice between flex(1,0,auto) with commas and fixed set of arguments and flex(auto 1 0) with space separated arbitrary order, I think I would clearly prefer any-order version... > -----Original Message----- > From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] > Sent: Wednesday, April 13, 2011 5:16 PM > To: Alex Mogilevsky > Cc: www-style list > Subject: Re: [css3-flexbox] Best way to denote flexible lengths > > On Wed, Apr 13, 2011 at 5:09 PM, Alex Mogilevsky <alexmog@microsoft.com> > wrote: > > With some other properties we have space separated lists where arguments > can go in an order. Is there a precedent in applying that to functional > notation? Then flex(auto,2) could mean same as flex(2,auto). And > flex(1)==flex(auto). It would seem consistent with other syntax where > people don't have to remember argument order when arguments are strongly > typed. > > If we did do this, I'd probably want to omit the commas entirely, and just > make it a function that takes space-separated arguments in any order. > Radial gradients do this a little bit - the <position> is fairly loose in > its ordering (inherited from background-position), and the size/shape > argument can accept the two keywords in either order. > > Alternately, scrap the flex() function entirely, and change the > width/height properties to accept a <length> and up to two <fraction>s, so > you can just write "width: 2fr" for some absolute flex, or "width: auto > 1fr 1fr" for some relative flex that can both grow and shrink. Is this > acceptable for Grid? > > ~TJ
Received on Thursday, 14 April 2011 00:23:02 UTC