We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No ? Yes ? No ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? ? ? Yes ? ? ?

See also

Document Tags and Contributors

Contributors to this page: fscholz, Sebastianz
Last updated by: fscholz,