W3C home > Mailing lists > Public > www-style@w3.org > November 2001

What is getComputedStyle supposed to be for?

From: Mark Morin <markpmorin@telusplanet.net>
Date: Mon, 5 Nov 2001 16:08:06 -0700
Message-ID: <002901c1664e$bafab7c0$584c3b8e@diamond>
To: <www-style@w3.org>
I think I'm confused about what the intent is of getComputedStyle.  On
seeing the name I thought that it would give me access to the final
properties of elements but, since these "actual values" can be different
from the calculated values this isn't it.

I thought maybe the idea was to give access to as much style sheet
information as was available before any user agent specific information was
used (sort of like "specified value" except without resolving inherited to
the value of the parent element since that is a computed value).  I don't
think this is it since, to convert from relative to absolute values in some
cases, detailed information about the user agent's font and pixel size need
to be used.  Not to mention the user agent style sheet, target media, and
initial containing block size.

So it seems that a way of accessing specified, computed, or actual values
could have been provided and it was chosen to provide access to the computed
values.  Why?

How was getComputedStyle intended to be used and by whom?

I'm new here so apologies if this has been asked and answered before.

Received on Monday, 5 November 2001 18:04:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:59 UTC