CSSMathSum
The CSSMathSum interface of the CSS Typed Object Model API represents the result obtained by calling add(), sub(), or toSum() on CSSNumericValue.
Extends
Methods
add()
add(...values): CSSNumericValue;
The add() method of the CSSNumericValue interface adds a supplied number to the CSSNumericValue.
Parameters
| Parameter | Type |
|---|---|
...values | CSSNumberish[] |
Returns
Inherited from
div()
div(...values): CSSNumericValue;
The div() method of the CSSNumericValue interface divides the CSSNumericValue by the supplied value.
Parameters
| Parameter | Type |
|---|---|
...values | CSSNumberish[] |
Returns
Inherited from
equals()
equals(...value): boolean;
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.
Parameters
| Parameter | Type |
|---|---|
...value | CSSNumberish[] |
Returns
boolean
Inherited from
max()
max(...values): 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.
Parameters
| Parameter | Type |
|---|---|
...values | CSSNumberish[] |
Returns
Inherited from
min()
min(...values): 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.
Parameters
| Parameter | Type |
|---|---|
...values | CSSNumberish[] |
Returns
Inherited from
mul()
mul(...values): CSSNumericValue;
The mul() method of the CSSNumericValue interface multiplies the CSSNumericValue by the supplied value.
Parameters
| Parameter | Type |
|---|---|
...values | CSSNumberish[] |
Returns
Inherited from
sub()
sub(...values): CSSNumericValue;
The sub() method of the CSSNumericValue interface subtracts a supplied number from the CSSNumericValue.
Parameters
| Parameter | Type |
|---|---|
...values | CSSNumberish[] |
Returns
Inherited from
to()
to(unit): CSSUnitValue;
The to() method of the CSSNumericValue interface converts a numeric value from one unit to another.
Parameters
| Parameter | Type |
|---|---|
unit | string |
Returns
Inherited from
toString()
toString(): string;
Returns
string
Inherited from
toSum()
toSum(...units): CSSMathSum;
The toSum() method of the CSSNumericValue interface converts the object's value to a CSSMathSum object to values of the specified unit.
Parameters
| Parameter | Type |
|---|---|
...units | string[] |
Returns
CSSMathSum
Inherited from
type()
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.
Returns
Inherited from
Properties
operator
readonly operator: CSSMathOperator;
The CSSMathValue.operator read-only property of the CSSMathValue interface indicates the operator that the current subtype represents. For example, if the current CSSMathValue subtype is CSSMathSum, this property will return the string "sum".
Inherited from
values
readonly values: CSSNumericArray;
The CSSMathSum.values read-only property of the CSSMathSum interface returns a CSSNumericArray object which contains one or more CSSNumericValue objects.