CSSMathInvert: value property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Want more browser support for this feature? Tell us why.
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> |