CSSNumericValue
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
TheCSSNumericValue interface of theCSS Typed Object Model API represents operations that all numeric values can perform.
In this article
Interfaces based on CSSNumericValue
Below is a list of interfaces based on the CSSNumericValue interface.
Instance properties
None.
Static methods
CSSNumericValue.parseAllows a
CSSNumericValueto be constructed directly from a string containing CSS.
Instance methods
CSSNumericValue.addAdds a supplied number to the
CSSNumericValue.CSSNumericValue.subSubtracts a supplied number from the
CSSNumericValue.CSSNumericValue.mulMultiplies the
CSSNumericValueby the supplied value.CSSNumericValue.divDivides the
CSSNumericValueby the supplied value.CSSNumericValue.minReturns the minimum value passed
CSSNumericValue.maxReturns the maximum value passed
CSSNumericValue.equalsTrue if all the values are the exact same type and value, in the same order. Otherwise,false.
CSSNumericValue.toConverts
valueinto another one with the specifiedunit.CSSNumericValue.toSumConverts an existing
CSSNumericValueinto aCSSMathSumobject with values of a specified unit.CSSNumericValue.typeReturns the type of
CSSNumericValue, one ofangle,flex,frequency,length,resolution,percent,percentHint, ortime.
Specifications
| Specification |
|---|
| CSS Typed OM Level 1> # numeric-value> |