CSSValue.cssText

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
cssText
Deprecated
Chrome No support NoEdge ? Firefox No support 1Ā ā€” 62IE ? Opera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android No support 4Ā ā€” 62Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

No support Ā 
No support
Compatibility unknown Ā 
Compatibility unknown
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

See also