CSSNumericValue

Draft
This page is not complete.

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The CSSNumericValue interface of the CSS Typed Object Model API represents operations that all numeric values can perform.

Interfaces based on CSSNumericValue

Below is a list of interfaces based on the CSSNumericValue interface.

Properties

None.

Event handlers

No

Methods

CSSNumericValue.add
Adds a supplied number to the CSSNumericValue.
CSSNumericValue.sub
Subtracts a supplied number from the CSSNumericValue.
CSSNumericValue.mul
Multiplies the CSSNumericValue by the supplied value.
CSSNumericValue.div
Divides the CSSNumericValue by the supplied value.
CSSNumericValue.min
Returns the minimum value passed
CSSNumericValue.max
Returns the maximum value passed
CSSNumericValue.equals
True if all the values are the exact same type and value, in the same order. Otherwise, false.
CSSNumericValue.to
Converts value into another one with the specified unit.
CSSNumericValue.toSum
TBD
CSSNumericValue.type
TBD
CSSNumericValue.parse
Allows a CSSNumericValue to be constructed directly from a string containing CSS.

Specifications

Specification Status Comment
CSS Typed OM Level 1
The definition of 'CSSNumericValue' in that specification.
Working Draft Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CSSNumericValue
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
add
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
div
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
equals
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
max
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
min
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
mul
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
parse
Experimental
Chrome Full support 66
Notes
Full support 66
Notes
Notes Not exposed to PaintWorklet.
Edge Full support 79
Notes
Full support 79
Notes
Notes Not exposed to PaintWorklet.
Firefox No support NoIE No support NoOpera Full support 53
Notes
Full support 53
Notes
Notes Not exposed to PaintWorklet.
Safari No support NoWebView Android Full support 66
Notes
Full support 66
Notes
Notes Not exposed to PaintWorklet.
Chrome Android Full support 66
Notes
Full support 66
Notes
Notes Not exposed to PaintWorklet.
Firefox Android No support NoOpera Android Full support 47
Notes
Full support 47
Notes
Notes Not exposed to PaintWorklet.
Safari iOS No support NoSamsung Internet Android Full support 9.0
Notes
Full support 9.0
Notes
Notes Not exposed to PaintWorklet.
sub
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
to
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
toSum
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0
type
Experimental
Chrome Full support 66Edge Full support 79Firefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support 9.0

Legend

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.

See Also