PokéRogue
    Preparing search index...

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

    MDN Reference

    interface CSSNumericValue {
        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 (View Summary)

    Index

    Methods

    • 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

      Parameters

      Returns boolean

    • 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

      Parameters

      Returns CSSNumericValue

    • 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

      Parameters

      Returns CSSNumericValue

    • The to() method of the CSSNumericValue interface converts a numeric value from one unit to another.

      MDN Reference

      Parameters

      • unit: string

      Returns CSSUnitValue

    • Returns string

    • The toSum() method of the CSSNumericValue interface converts the object's value to a CSSMathSum object to values of the specified unit.

      MDN Reference

      Parameters

      • ...units: string[]

      Returns CSSMathSum

    • 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

      Returns CSSNumericType