Re: [css3-flexbox] Best way to denote flexible lengths

On Wed, Apr 13, 2011 at 11:14 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Apr 13, 2011, at 5:29 PM, Tab Atkins Jr. wrote:
>> On Wed, Apr 13, 2011 at 5:22 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
>>> 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...
>>
>> Okay, then I'll change the draft to accept the 'fr' unit and the
>> 'flex()' function with space-separated any-order arguments.  Sound
>> good?
>
> I'm confused. 'flex(auto 1 0)' is the same as 'flex(auto 0 1)' or 'flex(1 auto 0)'?

As Alex says, the pos-flex and neg-flex, being both integers, must be
ordered.  The obvious order is that the first integer is pos-flex and
the second is neg-flex, so "flex(auto 1 0)" would be equivalent to
"flex(1 auto 0)", "flex(1 0 auto)", "flex(1 auto)", "flex(auto 1)",
"flex(1)" and "flex(auto)".  (I think that's the most prolific
combination for variants, because it matches the defaults.)

~TJ

Received on Thursday, 14 April 2011 16:43:09 UTC