W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css3-flexbox] ambiguity in flex shorthand?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 21 Mar 2013 09:17:28 -0700
Message-ID: <CAAWBYDDEvA=WBXwdRenp8xktO97HqNv0pFnyUkcNzwHwJjOKaw@mail.gmail.com>
To: Christian Biesinger <cbiesinger@chromium.org>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>
On Thu, Mar 21, 2013 at 9:05 AM, Christian Biesinger
<cbiesinger@chromium.org> wrote:
> At the end of the section, the spec says "A unitless zero that is not
> already preceded by two flex factors must be interpreted as a flex
> factor. To avoid misinterpretation or invalid declarations, authors
> must specify a zero <flex-basis> component with a unit or precede it
> by two flex factors."
> So it will be the first of your options.

Thanks, Christian!  Yes, this is the correct answer - the spec
specifies that "flex: 1 0;" resolves to "flex-grow: 1; flex-shrink: 0;
flex-basis: 0;".

(Note that Daniel's third option isn't possible even without the spec
clarifying things, as "1" isn't a length.)

Received on Thursday, 21 March 2013 16:18:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC