GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — CSSNumericValue - Web APIs | MDN

CSSNumericValue

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.

  • See full compatibility
  • Learn more

Note: This feature is available in Web Workers.

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

Instance properties

None.

Static methods

CSSNumericValue.parse

Allows a CSSNumericValue to be constructed directly from a string containing CSS.

Instance 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

Returns true if every value passed is the same as the CSSNumericValue, written with the same values and units, and false otherwise.

CSSNumericValue.to

Converts value into another one with the specified unit.

CSSNumericValue.toSum

Converts an existing CSSNumericValue into a CSSMathSum object with values of a specified unit.

CSSNumericValue.type

Returns the type of CSSNumericValue, one of angle, flex, frequency, length, resolution, percent, percentHint, or time.

Interfaces based on CSSNumericValue

  • CSSMathClamp
  • CSSMathInvert
  • CSSMathMax
  • CSSMathMin
  • CSSMathNegate
  • CSSMathProduct
  • CSSMathSum
  • CSSMathValue
  • CSSNumericArray
  • CSSUnitValue

Specifications

Specification
CSS Typed OM Level 1
# numeric-value

Browser compatibility

See also

  • CSSImageValue
  • CSSKeywordValue
  • CSSPositionValue
  • CSSTransformValue
  • CSSUnparsedValue

Help improve MDN

Learn how to contribute

This page was last modified on Oct 19, 2026 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.