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

Tab Atkins Jr. wrote:
> They are exposed as such.  Note that the CSSVariablesMap interface
> operations all indirect through getProperty/setProperty.

OK.

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
   specification.

   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