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.0

Clear Unit

Type: Function
clearUnit();

Strips the unit off a number, returning it unitless.

Arguments

NameTypeDescription
$valuenumberAccepts 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.

Sass
@use "sass:math";
.title {
  font-size: 24px;
  line-height: math.div(clearUnit(36px), clearUnit(24px));
}
CSS
.title {
  font-size: 24px;
  line-height: clearUnit(36px)/clearUnit(24px);
}