Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The CSSMathSum interface of the CSS Typed Object Model API represents the result obtained by calling add(), sub(), or toSum() on CSSNumericValue.
A CSSMathSum is the object type returned when the StylePropertyMapReadOnly.get() method is used on a CSS property whose value is created with a calc() function.
CSSStyleValue CSSNumericValue CSSMathValue CSSMathSumCreates a new CSSMathSum object.
Returns a CSSNumericArray object which contains one or more CSSNumericValue objects.
The interface may also inherit methods from its parent interface, CSSMathValue.
The interface may also inherit methods from its parent interface, CSSMathValue.
We create an element with a width determined using a calc() function, then console.log() the operator and values, and dig into the values a bit.
We assign a width
We add the JavaScript
The specification is still evolving. In the future we may write the last three lines as:
| CSS Typed OM Level 1 # cssmathsum |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Dec 17, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.