- From: Christian Biesinger <cbiesinger@chromium.org>
- Date: Thu, 21 Mar 2013 09:05:45 -0700
- To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
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. -christian On Thu, Mar 21, 2013 at 6:02 AM, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote: > Section 7.1 [1] of the spec says the flex shorthand is defined as > follows: > > none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ] > > Some examples in section clearly show or deal with a unitless value of 0 > for 'flex-basis'. But a unitless value here can be ambiguous, what > is the meaning of 'flex: 1 0' ? > > Is that > > flex-grow: 1 > flex-shrink: 0 > flex-basis: 0 (default when omitted) > > or > > flex-grow: 1 > flex-shrink: 1 (default when omitted) > flex-basis: 0 > > or even > > flex-grow: 0 > flex-shrink: 1 (default when omitted) > flex-basis: 1 > > ? So I think the grammar of that shorthand has to be tweaked a bit to > resolve the ambiguity. And possibly a word about unitless widths for > flex-basis longhand? > > [1] http://dev.w3.org/csswg/css3-flexbox/#flex-property > > </Daniel> >
Received on Thursday, 21 March 2013 16:06:15 UTC