W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [css21] height/width computed value is wrong

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 11 Feb 2010 12:19:13 -0800
To: Anne van Kesteren <annevk@opera.com>
Cc: CSS WG <www-style@w3.org>
Message-ID: <20100211201913.GA4766@pickering.dbaron.org>
On Thursday 2010-02-11 15:20 +0100, Anne van Kesteren wrote:
> From work on getComputedStyle I figured out our current definition
> for computed value for both 'height' and 'width' does not match
> existing implementations (although I have not tested Internet
> Explorer). Here is a simple testcase:
> 
>   http://dump.testsuite.org/2010/width-computed-value.htm
> 
> If the blue bar is less wide than the window the user agent agrees
> with me that the definition is wrong. Namely it states that the
> computed value is 'auto' if the property does not apply (e.g. when
> display is set to inline). Nobody follows this however. If we remove
> 
>   "; 'auto' if the property does not apply"
> 
> from the computed value definitions we will match contemporary
> implementations. (And getComputedStyle can be defined somewhat more
> sanely.)

Why are the "Computed Value" lines in the CSS 2.1 spec relevant
here?  The getComputedStyle method corresponds largely to what CSS
2.0 called computed values (though didn't define precisely), but
which CSS 2.1 calls used values.  So I would expect the spec for
getComputedStyle to refer to CSS 2.1's definition of "used value"
(though perhaps for 'display:none' elements or those inside
'display:none' elements, it should refer to computed values).

(Likewise, for widths in percentages, the computed value is the
percentage, but the used value is a length.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Thursday, 11 February 2010 20:20:05 GMT

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