W3C home > Mailing lists > Public > www-style@w3.org > April 2011

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

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Thu, 14 Apr 2011 07:25:58 +0000
To: Brad Kemper <brad.kemper@gmail.com>, Tab Atkins Jr. <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928411F2D386@TK5EX14MBXC213.redmond.corp.microsoft.com>
Elsewhere I believe the order is not important if it is not ambiguous. Since we have to numbers they have to be in order - positive flex then negative flex if we want reasonable default.

Having good defaults is key here (just as it is with 'background' property)

	flex(1) 	means (preferred=auto, positive-flex=1, negative-flex=0)
	flex(auto) 	means (preferred=auto, positive-flex=1, negative-flex=0)
	flex(0) 	means (preferred=auto, no flexibility)

if this is really the way to go, it should probably accept unitless zero length at certain priority (first or last... I think last)

-----Original Message-----
From: Brad Kemper [mailto:brad.kemper@gmail.com] 
Sent: Wednesday, April 13, 2011 11:15 PM
To: Tab Atkins Jr.
Cc: Alex Mogilevsky; www-style list
Subject: Re: [css3-flexbox] Best way to denote flexible lengths


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)'?
Received on Thursday, 14 April 2011 07:26:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT