CSSUnitValue

open class CSSUnitValue(var value: Double, val unit: String) : CSSNumericValue(source)

The CSSUnitValue interface of the CSS Typed Object Model API represents values that contain a single unit type.

MDN Reference

Constructors

Link copied to clipboard
constructor(value: Double, unit: String)

Properties

Link copied to clipboard

The CSSUnitValue.unit read-only property of the CSSUnitValue interface returns a string indicating the type of unit.

Link copied to clipboard

The CSSUnitValue.value property of the A double.

Functions

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

The add() method of the CSSNumericValue.

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

The div() method of the supplied value.

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

The equals() method of the value are strictly equal.

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

The max() method of the passed.

Link copied to clipboard
fun min(vararg values: CSSNumberish): CSSNumericValue

The min() method of the values passed.

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

The mul() method of the the supplied value.

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

The sub() method of the CSSNumericValue.

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

The to() method of the another.

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

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

Link copied to clipboard

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