The cssText
property of the CSSValue
interface represents the current computed CSS property value.
Syntax
cssText = cssValue.cssText;
Value
A DOMString
representing the current CSS property value.
Example
var styleDeclaration = document.styleSheets[0].cssRules[0].style;
var cssValue = styleDeclaration.getPropertyCSSValue("color");
console.log(cssValue.cssText);
Specifications
Specification | Status | Comment |
---|---|---|
Document Object Model (DOM) Level 2 Style Specification The definition of 'CSSValue.cssText' in that specification. |
Obsolete | Initial definition |
Browser compatibility
BCD tables only load in the browser