Re: [css3-flexbox] what's the computed value of "width: flex(...)" in a non-flexbox context?

On Wed, Jun 8, 2011 at 11:49 AM, Daniel Holbert <> wrote:
> Hi www-style,
> What is the computed value of the "flex()" function, in non-flexbox
> contexts?  I looked at the current editor's draft[1], and this didn't seem
> to be specified anywhere.

It's not specified anywhere.  The spec isn't yet complete,
particularly in the fiddly processing details.

> I can think of a few reasonable behaviors, but I don't know which one is
> correct (or if one has even been settled upon as correct).  Some options I
> see are laid out below:
>  In non-flexbox containers, width|height:flex() computes to...
>  (1) ...'auto'
>  (2) ...the preferred-size argument within flex()
>  (3) ...the same flex() function as if we were inside a flexbox...
>     (3a) ...which is treated as 'auto'
>     (3b) ...which is treated as its preferred-size argument
> Which (if any) of the above options are correct?
> I have a similar question about the "fr" unit -- does "width: 2fr" always
> compute to "2fr", regardless of context?  (Or, perhaps it computes to 'auto'
> or maybe '0' (its implicit preferred size) in contexts where the meaning of
> 'fr' is undefined? Or perhaps it computes to the equivalent flex()
> function?)
> Thanks,
> Daniel Holbert
> Mozilla Corporation
> [1] dated 19 April 2011

I'm inclined to have both flex() and the 'fr' unit compute to 'auto'
in non-flex contexts.  We don't really need to do anything smart,
because it's simply an error to use these units outside of flex-aware


Received on Thursday, 9 June 2011 18:18:04 UTC