Allowed units type.
Readonly
noA similar kind of dimensions supporting all units this one supports, except percents (%
).
undefined
if there is no such dimension kind. Refers itself if does not support percents.
Optional
Readonly
ptA similar kind of dimensions supporting all units this one supports and, in addition, supporting percents (%
).
undefined
if there is no such dimension kind. Refers itself if supports percents.
Readonly
zeroZero value of this kind.
Typically, this is unit-less StypZero. But some dimensions require units.
Maps the given CSS property value to the one compatible with this dimension kind. Defaults to undefined
if mapping is not possible.
This method allows to use a dimension kind as CSS property mapping.
Any scalar or non-numeric value is mapped to undefined
. A numeric value is converted to this dimension by
toDim method.
A raw property value that should be converted.
Mapped property value or undefined
.
Constructs dimension value.
Numeric dimension value.
Dimension unit.
Constructed dimension value. Either StypDimension instance, or StypZero if val
is 0
and this dimension kind supports unitless zero.
Generated using TypeDoc
A kind of dimensions. E.g. angle, length, percentage, etc.
It is perfectly fine to use dimensions interchangeably as long as dimension units are compatible.