CSSValue

The CSSValue interface represents the current computed value of a CSS property.

Properties

CSSValue.cssText
A DOMString representing the current value.
CSSValue.cssValueTypeRead only
An unsigned short representing a code defining the type of the value. Possible values are:
Constant Description
CSS_CUSTOM The value is a custom value.
CSS_INHERIT The value is inherited and the cssText contains "inherit".
CSS_PRIMITIVE_VALUE The value is a primitive value and an instance of the CSSPrimitiveValue interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.
CSS_VALUE_LIST The value is a CSSValue list and an instance of the CSSValueList interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.

Specifications

Specification Status Comment
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSValue' in that specification.
Obsolete Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CSSValue
Deprecated
Chrome No support NoEdge No support NoFirefox 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 No support No
cssText
Deprecated
Chrome No support NoEdge No support NoFirefox 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 No support No
cssValueType
Deprecated
Chrome No support NoEdge No support NoFirefox 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 No support No

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