Initial declarations, as CSS text ("color: red; font-size: 12px;")
All the declarations as one CSS text string.
Replace every declaration by parsing a CSS text string ("color: red; font-size: 12px !important;").
How many properties are currently set.
"important" when the property was set with !important, otherwise ''.
A CSS property name (kebab-case)
The value of the given property, or '' when it is not set.
A CSS property name (kebab-case, e.g. "background-color")
The name of the property at the given index, in the order it was set, or '' when there is none (matches the DOM's CSSStyleDeclaration, which is array-like).
Remove a property, returning the value it had (or '' when it was not set).
A CSS property name (kebab-case)
Set a property's value (and optionally its priority). An empty, null or undefined value removes the property instead, like the DOM.
A CSS property name (kebab-case)
The value, or '' to remove the property
"important" to mark it !important
Simulate the behaviour of the CSSStyleDeclaration Class when there is no DOM available: an ordered map of CSS property/value pairs, parsed from and serialized back to a cssText string. Values are stored and returned as given, with no unit conversion, shorthand expansion or validation - this is a data structure, not a real CSS engine. Named property access (declaration.backgroundColor, camelCase) is added on top of this by createStyleDeclaration, which wraps an instance of this class in a Proxy.