W3C home > Mailing lists > Public > www-style@w3.org > June 2011

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

From: Daniel Holbert <dholbert@mozilla.com>
Date: Wed, 08 Jun 2011 11:49:37 -0700
Message-ID: <4DEFC441.6030704@mozilla.com>
To: www-style@w3.org
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.

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] http://dev.w3.org/csswg/css3-flexbox/ dated 19 April 2011
Received on Wednesday, 8 June 2011 18:50:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:41 GMT