W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2008

Re: getComputedStyle results

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Mon, 31 Mar 2008 07:34:06 +0100
To: "Boris Zbarsky" <bzbarsky@mit.edu>, kagupta@rim.com, "DOM mailing list" <www-dom@w3.org>
Message-ID: <op.t8va64hijz3wb9@foobar.wag54gs>

Na , Boris Zbarsky <bzbarsky@MIT.EDU> escreveu:

>> The getComputedStyle return value is already well defined to be the  
>> "computed" values as described in  
>> http://www.w3.org/TR/CSS21/cascade.html#computed-value.
> That definition postdates the definition of getComputedStyle.  The  
> "computed style" getComputedStyle references is the CSS2 one.  Since UAs  
> currently on the market do not implement the CSS2 computed style (which  
> is neither equivalent to the CSS2.1 computed style nor quite to the  
> CSS2.1 used style, iirc), it's actually not that clear what  
> getComputedStyle should be doing.
>> Yes, computed values are well defined, but DOM 2 StyleSheets defines  
>> getComputedStyle to return absolute (or used) values
> The term "absolute value" only makes sense for lengths.  I don't believe  
> DOM 2 StyleSheets uses the term "used style" anywhere (which makes  
> sense, since that term postdates the spec in question).

So we really should be looking into  
The former spec mixed the two concepts, which either I'm not getting  
something, or is ambiguous.
But, there are many use case for having the user absolute values, pixels  
for lengths, hex or rgb for colors, while computed values are the rules as  
declared by the author and selected after the cascade.
So I'd like to propose to have two method to return both these values.
Like getComputedStyle would continue to reference computed values, and a  
new method like getAbsoluteStyle, with the same signature. Both "computed"  
and "absolute" concepts are defined in css2.1, and they should be too in  

> -Boris
Received on Monday, 31 March 2008 06:34:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:13 UTC