2019-02-20 09:42:44 -05:00
|
|
|
$base-space: 4px;
|
|
|
|
|
|
|
|
@function s(
|
|
|
|
$sizes: (
|
|
|
|
0
|
|
|
|
)
|
|
|
|
) {
|
|
|
|
$spaces: ();
|
|
|
|
@each $size in $sizes {
|
|
|
|
@if ($size == 0) {
|
2019-03-15 17:20:52 -04:00
|
|
|
// Strip units if 0
|
|
|
|
$size: $size * $base-space;
|
|
|
|
$size: $size / ($size * 0 + 1);
|
2019-03-20 14:56:34 -04:00
|
|
|
} @else if ($size == auto) {
|
|
|
|
$size: auto;
|
2019-03-15 17:20:52 -04:00
|
|
|
} @else {
|
|
|
|
$size: $size * $base-space;
|
2019-02-20 09:42:44 -05:00
|
|
|
}
|
2019-03-15 17:20:52 -04:00
|
|
|
|
|
|
|
$spaces: append($spaces, $size);
|
2019-02-20 09:42:44 -05:00
|
|
|
}
|
|
|
|
@return $spaces;
|
|
|
|
}
|