W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css-om][css-variables] exposing variables through CSSStyleDeclaration

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 28 Aug 2013 07:55:47 -0700
Message-ID: <CAAWBYDDwwaTKcvcgeXFo8a3CwiXL4j+fyA9GPhBmDmDCrt7FLw@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: Cameron McCormack <cam@mcc.id.au>, www-style list <www-style@w3.org>
On Wed, Aug 28, 2013 at 1:41 AM, Simon Pieters <simonp@opera.com> wrote:
> I'm not sure what getComputedStyle should do. I guess include all "supported
> CSS properties" (i.e. excluding variables) and then include the specified
> variables.

No, we can't do this.  getComputedStyle returns an object with keys
being the camelCased transformations of the property names.  Variables
*can not* be transformed in this way, which is part of the reason I
added CSSVariablesMap in the first place.  They also can't be
reasonably sorted without getting into all the unicode collation
issues we *specifically* tried to avoid.

The getComputedStyle object should just have a .var attribute, like
what you get from a normal style rule, with a readonly CSSVariablesMap
hanging off of it.

Received on Wednesday, 28 August 2013 14:56:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC