W3C home > Mailing lists > Public > www-style@w3.org > July 2014

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 25 Jul 2014 10:03:09 +1000
Message-ID: <53D19EBD.1070000@mcc.id.au>
To: Simon Pieters <simonp@opera.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
On 28/08/13 18:41, Simon Pieters wrote:
> The CSSOM spec is probably wrong when it comes to how to deal with
> variables. I'll look into fixing it.
>
> 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.

To bring this back up: while you can get custom property values off a 
CSSStyleDeclaration for a style sheet rule, you can't for a 
CSSStyleDeclaration that is returned from getComputedStyle.  This is 
because the definition of getComputedStyle says to return a "live CSS 
declaration block" whose declarations include "[a]ll longhand properties 
that are supported CSS properties, in lexicographical order ...".

Can we add the custom properties that are available on that element to 
the end of the list, sorted lexicographically (which doesn't seem to 
have a definition in this spec but which I'm assuming means sorted by 
code point)?
Received on Friday, 25 July 2014 00:03:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC