mirror of https://github.com/vizality/vizality
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
364 B
15 lines
364 B
/// Trims leading and trailing whitespace from a string.
|
|
///
|
|
|
|
@function str-trim ($str) {
|
|
$output: $str;
|
|
@if (str-slice($output, 1, 1) == ' ') {
|
|
$output: str-trim(str-slice($output, 2));
|
|
}
|
|
|
|
@if (str-slice($output, str-length($output), -1) == ' ') {
|
|
$output: str-trim(str-slice($output, 1, -2));
|
|
}
|
|
|
|
@return $output;
|
|
} |