The numeric value of the number.
If passed, the number's unit.
Complex units can be represented as <unit>*<unit>*.../<unit>*<unit>*...
, with numerator units on the left-hand side of the /
and denominator units on the right. A number with only numerator units may omit the /
and the units after it, and a number with only denominator units may be represented with no units before the /
.
Returns a string representation of this number's units. Complex units are returned in the same format that constructor accepts them.
Returns the value of the number, ignoring units.
This means that 96px
and 1in
will return different values, even though they represent the same length.
Destructively modifies this number by setting its units to unit
, independent of its numeric value. Complex units are specified in the same format as constructor.
Destructively modifies this number by setting its numeric value to value
, independent of its units.
© 2006–2022 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/classes/types.Number
Sass's number type.