mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 20:53:40 +08:00
24 lines
389 B
SCSS
24 lines
389 B
SCSS
$base-space: 4px;
|
|
|
|
@function s(
|
|
$sizes: (
|
|
0
|
|
)
|
|
) {
|
|
$spaces: ();
|
|
@each $size in $sizes {
|
|
@if ($size == 0) {
|
|
// Strip units if 0
|
|
$size: $size * $base-space;
|
|
$size: $size / ($size * 0 + 1);
|
|
} @else if ($size == auto) {
|
|
$size: auto;
|
|
} @else {
|
|
$size: $size * $base-space;
|
|
}
|
|
|
|
$spaces: append($spaces, $size);
|
|
}
|
|
@return $spaces;
|
|
}
|