CSSMathNegate

The CSSMathNegate interface of the CSS Typed Object Model API represents the negation of a CSSNumericValue.

MDN Reference

Constructors

Link copied to clipboard
constructor(arg: CSSNumberish)

Properties

Link copied to clipboard
open external val operator: CSSMathOperator

The operator read-only property of the CSSMathValue interface returns the operator that the current subtype represents. For example, if the current CSSMathValue subtype is CSSMathSum, this property will return the string "sum".

Link copied to clipboard
open external val value: CSSNumericValue

The value read-only property of the CSSMathNegate interface returns the CSSNumericValue that is being negated.

Functions

Link copied to clipboard
open external fun add(vararg values: CSSNumberish): CSSNumericValue

The add() method of the CSSNumericValue interface adds a supplied number to the CSSNumericValue.

Link copied to clipboard
open external fun div(vararg values: CSSNumberish): CSSNumericValue

The div() method of the CSSNumericValue interface divides the CSSNumericValue by the supplied value.

Link copied to clipboard
open external fun equals(vararg value: CSSNumberish): Boolean

The equals() method of the CSSNumericValue interface returns true if every value passed to it is the same as the CSSNumericValue, and false otherwise.

Link copied to clipboard
open external fun max(vararg values: CSSNumberish): CSSNumericValue

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.

Link copied to clipboard
open external fun min(vararg values: CSSNumberish): 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.

Link copied to clipboard
open external fun mul(vararg values: CSSNumberish): CSSNumericValue

The mul() method of the CSSNumericValue interface multiplies the CSSNumericValue by the supplied values.

Link copied to clipboard
open external fun sub(vararg values: CSSNumberish): CSSNumericValue

The sub() method of the CSSNumericValue interface subtracts a supplied number from the CSSNumericValue.

Link copied to clipboard
open external fun to(unit: String): CSSUnitValue

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

Link copied to clipboard
open external fun toSum(vararg units: String): CSSMathSum

The toSum() method of the CSSNumericValue interface converts the object's value to a CSSMathSum of CSSUnitValues using only the specified units, if possible. If called with no units, it simplifies the value into a minimal sum of CSSUnitValues instead.

Link copied to clipboard
open external fun type(): CSSNumericType

The type() method of the CSSNumericValue interface returns the type of CSSNumericValue, one of angle, flex, frequency, length, resolution, percent, percentHint, or time.