The CSSMathValue interface of the CSS Typed Object Model API a base class for classes representing complex numeric values.

MDN Reference

interface CSSMathValue {
    operator: CSSMathOperator;
    add(...values: CSSNumberish[]): CSSNumericValue;
    div(...values: CSSNumberish[]): CSSNumericValue;
    equals(...value: CSSNumberish[]): boolean;
    max(...values: CSSNumberish[]): CSSNumericValue;
    min(...values: CSSNumberish[]): CSSNumericValue;
    mul(...values: CSSNumberish[]): CSSNumericValue;
    sub(...values: CSSNumberish[]): CSSNumericValue;
    to(unit: string): CSSUnitValue;
    toString(): string;
    toSum(...units: string[]): CSSMathSum;
    type(): CSSNumericType;
}
Hierarchy
Index

Properties

operator: CSSMathOperator

The CSSMathValue.operator read-only property of the CSSMathValue interface indicates the operator that the current subtype represents.

MDN Reference

Methods

  • Returns string

  • The toSum() method of the js-nolint toSum(units) - units - : The units to convert to.

    MDN Reference

    Parameters

    • ...units: string[]

    Returns CSSMathSum