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

Validate Length

Type: Function
validateLength();

Returns the value if it is a length or one of auto, inherit, initial, 0.

Arguments

NameTypeDescription
$valuenumber (with unit)Accepts a length with a unit, or auto, inherit, initial, 0. null is returned as it is, without a warning, so a caller can skip a value.

Examples

Validating a length argument in a mixin of your own.

Sass
@mixin inset($amount) {
  padding: validateLength($amount);
}
.panel {
  @include inset(2rem);
}
CSS
.panel {
  padding: 2rem;
}