---
title: "CSSNumericValue | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface CSSNumericValue

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue)

interface CSSNumericValue {  
    [add](#add-1)(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue;  
    [div](#div-1)(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue;  
    [equals](#equals-1)(...value: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): boolean;  
    [max](#max-1)(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue;  
    [min](#min-1)(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue;  
    [mul](#mul-1)(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue;  
    [sub](#sub-1)(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue;  
    [to](#to-1)(unit: string): [CSSUnitValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSUnitValue/);  
    [toString](#tostring-1)(): string;  
    [toSum](#tosum-1)(...units: string\[\]): [CSSMathSum](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSMathSum/);  
    [type](#type-1)(): [CSSNumericType](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSNumericType/);  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.CSSNumericValue))

-   [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)
    -   CSSNumericValue
        -   [CSSUnitValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSUnitValue/)
        -   [CSSMathValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSMathValue/)

##### Index

### Methods[](#methods)

[add](#add) [div](#div) [equals](#equals) [max](#max) [min](#min) [mul](#mul) [sub](#sub) [to](#to) [toString](#tostring) [toSum](#tosum) [type](#type)

## Methods[](#methods-1)

### add[](#add)

-   add(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue[](#add-1)
    
    The **`add()`** method of the CSSNumericValue interface adds a supplied number to the CSSNumericValue.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/add)
    
    #### Parameters
    
    -   ...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns CSSNumericValue
    

### div[](#div)

-   div(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue[](#div-1)
    
    The **`div()`** method of the CSSNumericValue interface divides the CSSNumericValue by the supplied value.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/div)
    
    #### Parameters
    
    -   ...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns CSSNumericValue
    

### equals[](#equals)

-   equals(...value: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): boolean[](#equals-1)
    
    The **`equals()`** method of the CSSNumericValue interface returns a boolean indicating whether the passed value are strictly equal. To return a value of true, all passed values must be of the same type and value and must be in the same order. This allows structural equality to be tested quickly.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/equals)
    
    #### Parameters
    
    -   ...value: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns boolean
    

### max[](#max)

-   max(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue[](#max-1)
    
    The **`max()`** method of the CSSNumericValue interface returns the highest value from among the values passed. The passed values must be of the same type.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/max)
    
    #### Parameters
    
    -   ...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns CSSNumericValue
    

### min[](#min)

-   min(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue[](#min-1)
    
    The **`min()`** method of the CSSNumericValue interface returns the lowest value from among those values passed. The passed values must be of the same type.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/min)
    
    #### Parameters
    
    -   ...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns CSSNumericValue
    

### mul[](#mul)

-   mul(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue[](#mul-1)
    
    The **`mul()`** method of the CSSNumericValue interface multiplies the CSSNumericValue by the supplied value.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/mul)
    
    #### Parameters
    
    -   ...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns CSSNumericValue
    

### sub[](#sub)

-   sub(...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]): CSSNumericValue[](#sub-1)
    
    The **`sub()`** method of the CSSNumericValue interface subtracts a supplied number from the CSSNumericValue.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/sub)
    
    #### Parameters
    
    -   ...values: [CSSNumberish](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CSSNumberish/)\[\]
    
    #### Returns CSSNumericValue
    

### to[](#to)

-   to(unit: string): [CSSUnitValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSUnitValue/)[](#to-1)
    
    The **`to()`** method of the CSSNumericValue interface converts a numeric value from one unit to another.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/to)
    
    #### Parameters
    
    -   unit: string
    
    #### Returns [CSSUnitValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSUnitValue/)
    

### toString[](#tostring)

-   toString(): string[](#tostring-1)
    
    #### Returns string
    
    Inherited from [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/).[toString](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/#tostring)
    

### toSum[](#tosum)

-   toSum(...units: string\[\]): [CSSMathSum](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSMathSum/)[](#tosum-1)
    
    The **`toSum()`** method of the CSSNumericValue interface converts the object's value to a CSSMathSum object to values of the specified unit.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/toSum)
    
    #### Parameters
    
    -   ...units: string\[\]
    
    #### Returns [CSSMathSum](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSMathSum/)
    

### type[](#type)

-   type(): [CSSNumericType](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSNumericType/)[](#type-1)
    
    The **`type()`** method of the CSSNumericValue interface returns the type of CSSNumericValue, one of angle, flex, frequency, length, resolution, percent, percentHint, or time.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/type)
    
    #### Returns [CSSNumericType](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSNumericType/)
