W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2001

Re: getComputedStyle() behavior

From: Jesse McCarthy <mccarthy36@earthlink.net>
Date: Tue, 11 Dec 2001 08:49:05 -0500
To: www-dom@w3.org, www-style@w3.org, bzbarsky@MIT.EDU
Message-ID: <MWMail.stlgmflt@host.none>

"Boris Zbarsky" <bzbarsky@MIT.EDU> wrote on 12/9/01 4:34:23 PM:
>
>> Netscape returns an actual value in pixels for 'left', ...  though I
>> don't know on what basis it is determining the point of reference for
>> the offset...
>
>Trust me, you don't want to know... :)

You're probably right.

>> should the behavior exhibited by Netscape be relied upon, that is can
>> it be considered the definitive conforming behavior in this scenario
>> (I doubt it)?
>
>No.  That behavior has been removed as of early November.  So the next
>Netscape release (and the 0.9.7 Mozilla milestone) will in fact behave
>quite differently.  The values it returns will be based on the specified
>style, not the actual position on the page.

That's good to know.

>
>I too would be interested in a clarification of the spec here (possibly
>an official one, to be placed in the errata?)
>

Yes, some clarification is definitely necessary.  And, as discussed in the 
bugzilla thread, there definitely needs to be a mechanism for retrieving the 
specified values as well as the computed or, better yet, actual values.  But, 
the question remains if there would be any value to retrieve in my scenario, 
and I'm not sure if it's a DOM or CSS question.  Being able to retrive actual 
values for certain properties of non-positioned elements -- top, right, 
bottom, left, width, height, etc. -- after they have been laid out according 
to normal flow would be necessary to accomplish a lot of useful things, as 
demonstrated in my example page, but as of now, that capability does not 
_seem_ to be defined, and I notice not incidentally that no one from W3C is 
saying anything.  You do the math. 

Jesse
Received on Tuesday, 11 December 2001 09:07:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT