CSSMathInvert: value property

Baseline 2026
Newly available

Since November 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Note: This feature is available in Web Workers.

The value read-only property of the CSSMathInvert interface returns the CSSNumericValue that is being inverted.

This is the parameter that was passed to the constructor when this object was created.

Value

A CSSNumericValue or one of its derived types.

Examples

Basic usage

The following code creates a CSSMathInvert object, then reads its value.

js
const inverted = new CSSMathInvert(CSS.percent(4));

console.log(inverted.value); // CSSUnitValue {value: 4, unit: "percent"}

value returns whatever was passed to arg in the constructor. In this case, we passed CSS.percent(4), so value is a CSSUnitValue. Passing an expression such as CSS.percent(4).add(CSS.em(2)) would result in value returning a CSSMathSum.

Specifications

Specification
CSS Typed OM Level 1
# dom-cssmathinvert-value

Browser compatibility

See also