Gerillass
v2.1.0Type: Function
fillNulls();
Replaces null entries in a list with 0, or drops them.
Arguments
| Name | Type | Description |
|---|---|---|
$value | list | Accepts a list that may contain nulls. |
$seperation (comma) | string | Accepts comma, or space. |
$skip (false) | boolean | Accepts true to leave nulls in place instead of using 0. |
Examples
Shorthand where only some sides are given.
.card {
margin: fillNulls(24px null null null, space);
}.card {
margin: 24px 0 0 0;
}What it refuses
Arguments are checked, so a wrong value stops the build with a message instead of quietly producing the wrong CSS.
.card {
margin: fillNulls(24px null, spaces);
}Error: `spaces` is not a valid $seperation for `fillNulls`. Pass `comma`, `space` or `slash`.