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

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 UTC