- From: Richard Fink <rfink@readableweb.com>
- Date: Wed, 3 Feb 2010 13:46:45 -0500
- To: "'Anne van Kesteren'" <annevk@opera.com>, "'CSS WG'" <www-style@w3.org>
>Does this sound like a good direction? FWIW: Yes indeed. Very much. I don't remember, but I might have used the term "appliedStyle" as a synonym for what I think you are proposing with the term "resolved values". The confusion for me, with computedStyle is that it reflects the CSS and not the actual choice that the browser is making. For example, a rule with a font stack like this: p{font-family: georgia, serif;} requires the UA to choose. I need to be able to query to see if it's Georgia or the default serif. Getting a return value of "Georgia, serif", doesn't do me a whole lot of good. I can already ascertain that from the CSS and other script properties that tell me what CSS bears upon that element. To extend the example: right now, the only way to know if a given font has loaded is based on the font's metrics. You have to write a string and measure its pixel height/width against pre-measured values. Sounds like the long way around the problem, doesn't it? I think "resolved values" would be highly useful. Rich -----Original Message----- From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Anne van Kesteren Sent: Wednesday, February 03, 2010 8:09 AM To: CSS WG Subject: [cssom] Defining getComputedStyle Hi, I'm basically looking for some comments from implementors whether I'm heading in the right direction with this. I'm trying to define getComputedStyle and it seems the only way to do that is to define a new kind of value concept. I tentatively named it "Resolved values" (I forgot who suggested this to me, sorry!): http://dev.w3.org/csswg/cssom/#resolved-values E.g. for the 'width' property it would say that if the property applies to the element (e.g. no display:none or display:inline) the resolved value is the used value in pixels and otherwise it would be the computed value. How the value is serialized (including canonicalization) would be defined elsewhere is as that is more generally applicable. Does this sound like a good direction? Thanks! Kind regards, -- Anne van Kesteren http://annevankesteren.nl/
Received on Wednesday, 3 February 2010 18:47:17 UTC