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:17:02 UTC