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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 14 Apr 2011 09:46:33 -0700
Message-ID: <BANLkTi=H3hTXT2NfPKDseNiBmp7G9W6WQA@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
On Thu, Apr 14, 2011 at 12:25 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> 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)

Yes to all of these.

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

Last, I guess.  That is, a '0' is only taken to be a length if there
are three arguments and they're all numbers.  In every other
combination, numbers are flex specifiers.

Alternately, if this seems a little ambiguous, we can just make flex()
take 'fr' units for its flex specifiers.  It's then unambiguous what
"flex(0 1fr)" means - it has a preferred size of 0 and a pos-flex of

Received on Thursday, 14 April 2011 16:47:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC