- From: Cameron McCormack <cam@mcc.id.au>
- Date: Wed, 28 Aug 2013 09:50:37 +1000
- To: www-style list <www-style@w3.org>
(Bringing this up to a top-level thread.)
What's the reasoning behind not exposing variables (with their custom
property names) through the CSSStyleDeclaration's operations and
attributes? I think they should be.
p { var-a: 1 !important; }
decl.cssText; // ~"var-a: 1 !important;"
decl.length; // 1
decl[0]; // "var-a"
decl.getPropertyValue("var-a"); // " 1 "
decl.getPropertyPriority("var-a"); // "important"
decl.setProperty("var-a", "2"); // changes the variable value
decl.removeProperty("var-a"); // removes the variable
Without this, there's no way to get at the priority of a custom property
declaration.
Received on Tuesday, 27 August 2013 23:51:11 UTC