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

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

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Thu, 21 Mar 2013 17:22:07 +0100
Message-ID: <514B33AF.5080509@disruptive-innovations.com>
To: www-style@w3.org
On 21/03/13 17:05, Christian Biesinger 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."

Ah thanks, I missed it. So this means that

   flex: 1px 1 2

is allowed but

   flex: 0 1 2 (where 0 is the flex basis)

is not. I understand we don't have an ambiguity in the spec but
honestly, that's not very nice. Can I ask why we just can't forbid
unitless lengths here and make the whole thing simpler? We've always
said in the past that unitless 0 length was tolerated but not
encouraged.

</Daniel>
Received on Thursday, 21 March 2013 16:22:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT