Gerillass
v2.1.0Type: Function
pixelify();
Returns the value with a px unit, adding one if it is missing.
Arguments
| Name | Type | Description |
|---|---|---|
$value | number | Accepts a number, with or without a unit. |
Examples
Accepting a size with or without a unit.
.icon {
width: pixelify(24);
height: pixelify(24px);
}.icon {
width: 24px;
height: 24px;
}What it refuses
Arguments are checked, so a wrong value stops the build with a message instead of quietly producing the wrong CSS.
.icon {
width: pixelify("24");
}Error: `24` is not a valid $value for `pixelify`. Pass a number, with or without a unit.