Gerillass 3.0.0 is out. One gradient mixin replaces two, and text-gradient takes its colours first, so read the migration guide before you upgrade.
Gerillass
v3.0.0Type: Function
clearUnit();
Strips the unit off a number, returning it unitless.
Arguments
| Name | Type | Description |
|---|---|---|
$value | number | Accepts a number, and returns it without its unit. Anything that is not a number is refused with an error. |
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);
}