Gerillass
v2.1.0Type: Function
clearWhitespace();
Removes every space from a string.
Arguments
| Name | Type | Description |
|---|---|---|
$string | string | Accepts any string. |
Examples
Turning a font family name into a filename.
.brand {
font-family: "Fanwood Text", serif;
background-image: url("/fonts/#{clearWhitespace("Fanwood Text")}.svg");
}.brand {
font-family: "Fanwood Text", serif;
background-image: url("/fonts/FanwoodText.svg");
}What it refuses
Arguments are checked, so a wrong value stops the build with a message instead of quietly producing the wrong CSS.
$size: 16;
.brand {
background-image: url("/fonts/#{clearWhitespace($size)}.svg");
}Error: `16` is not a valid $string for `clearWhitespace`. Pass a string.