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

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 28 Aug 2013 11:37:32 +1000
Message-ID: <521D545C.4070203@mcc.id.au>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
Tab Atkins Jr. wrote:
> They are exposed as such.  Note that the CSSVariablesMap interface
> operations all indirect through getProperty/setProperty.


CSSOM currently says this:

   The term supported CSS property refers to a CSS property that the
   user agent implements, and that is defined to be a case-insensitive
   property in the CSS specification. A supported CSS property must be
   in its lowercase form for the purpose of comparisons this

   CSS properties that are case-sensitive such as CSS Variables are
   author-defined and are represented with dedicated interfaces, and do
   not participate in the base CSSOM API.

I had misread thinking that getPropertyValue returns early if it's given 
a property name that is not a supported CSS property, but instead it 
looks for "a property of a declaration in the declarations" so that 
should be OK.

setProperty, however, does say:

   3. If property is not a case-sensitive match for a supported CSS
      property, terminate this algorithm.

so you wouldn't be able to to use it with a custom property.
Received on Wednesday, 28 August 2013 01:38:11 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:31 UTC