Gerillass
v2.1.0Type: Function
clearUnit();
Strips the unit off a number, returning it unitless.
Arguments
| Name | Type | Description |
|---|---|---|
$value | number | Accepts any number with a unit. |
Examples
A unitless line-height computed from two pixel sizes.
@use "sass:math";
.title {
font-size: 24px;
line-height: math.div(clearUnit(36px), clearUnit(24px));
}.title {
font-size: 24px;
line-height: clearUnit(36px)/clearUnit(24px);
}