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 — CSSNumericArray - Web APIs | MDN

CSSNumericArray

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 CSSNumericArray interface of the CSS Typed Object Model API represents an iterable of CSSNumericValue-based objects.

An object of this type is used to represent the operands of a mathematical operation in the values property of CSSMathSum, CSSMathProduct, CSSMathMin, and CSSMathMax.

The items can be accessed by index (array[0]), and as an iterable it can be used with a for...of loop or the spread syntax.

Instance properties

CSSNumericArray.length Read only

Returns the number of items in the object.

Instance methods

CSSNumericArray.entries()

Returns a new array iterator that yields [index, value] pairs for each item in the object.

CSSNumericArray.forEach()

Executes a provided function once for each item in the object.

CSSNumericArray.keys()

Returns a new array iterator that yields the index of each item in the object.

CSSNumericArray.values()

Returns a new array iterator that yields each item in the object.

Examples

Reading the terms of a CSSMathSum

The values property of a CSSMathSum is a CSSNumericArray containing the terms of the sum. This example creates a CSSMathSum, then reads its values via length, indexed access, and iteration.

js
const sum = new CSSMathSum(CSS.px(10), CSS.em(5), CSS.percent(50));
const values = sum.values;

console.log(values.length); // 3
console.log(values[0]); // CSSUnitValue {value: 10, unit: "px"}

for (const value of values) {
  console.log(value.toString());
}
// "10px"
// "5em"
// "50%"

Specifications

Specification
CSS Typed OM Level 1
# cssnumericarray

Browser compatibility

See also

  • CSSMathSum
  • CSSMathProduct
  • CSSMathMin
  • CSSMathMax
  • CSSNumericValue
  • Using the CSS Typed OM
  • CSS Typed Object Model API

Help improve MDN

Learn how to contribute

This page was last modified on Aug 15, 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.