W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

[csswg-drafts] [cssom] should custom properties be exposed on computed style declarations?

From: Cameron McCormack via GitHub <sysbot+gh@w3.org>
Date: Tue, 02 May 2017 08:37:35 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-225627382-1493714254-sysbot+gh@w3.org>
heycam has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] should custom properties be exposed on computed style declarations? ==
https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle

The spec currently says that the list of declarations that a `CSSStyleDeclaration` returned by `getComputedStyle` includes only "supported CSS properties", which means that it doesn't include custom properties.  I think it makes sense to expose these through computed style objects.

Gecko does this, both via `item()` and `getPropertyValue()`.  For `item()` (and the indexed getter) custom properties appear after all of the built-in properties, sorted by the order that they happen to cascade in (though that should probably become lexicographically sorted or something).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1316 using your GitHub account
Received on Tuesday, 2 May 2017 08:37:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC