Convert lengths between comparable units.
You can also convert to
relative to the browser default rather than the site root –
useful for media queries.
in all Accoutrement maps.
- NEW: Aliased as
Parameters & Return
$length: (length | string)
The length or named size to be converted.
The desired units to convert to.
Some units (
vmax) cannot be converted.
$from-context: false (length | string)
When converting from relative units,
the absolute length (in px) to which $length refers -
$lengths in em units, would normally be the
font-size of the current element.
null will resolve to your ‘root’ setting or 16px
$to-context: $from-context (length | string)
For converting to relative units,
the absolute length in px to which the output value will refer.
Defaults to the same as
$from-context, since it is rarely needed.
Context parameters must resolve to a value in pixel units