1 |
|
2 | $space-smaller: 0.25rem;
|
3 | $space-small: 0.5rem;
|
4 | $space-normal: 1rem;
|
5 | $space-big: 1.5rem;
|
6 | $space-bigger: 2rem;
|
7 | $space-large: 2.5rem;
|
8 | $space-larger: 3rem;
|
9 | $space-xl: 4rem;
|
10 | $space-xxl: 6rem;
|
11 |
|
12 |
|
13 | $spacing-sizes: (
|
14 | "-smaller": $space-smaller,
|
15 | "-small": $space-small,
|
16 | "-normal": $space-normal,
|
17 | "-big": $space-big,
|
18 | "-bigger": $space-bigger,
|
19 | "-large": $space-large,
|
20 | "-larger": $space-larger,
|
21 | "-xl": $space-xl,
|
22 | "-xxl": $space-xxl
|
23 | );
|
24 |
|
25 | $spacing-properties: (
|
26 | "padding",
|
27 | "margin"
|
28 | );
|
29 |
|
30 | $spacing-direction-groups: (
|
31 | "-top": "-top",
|
32 | "-right": "-right",
|
33 | "-bottom": "-bottom",
|
34 | "-left": "-left",
|
35 | "-horizontal": "-left" "-right",
|
36 | "-vertical": "-top" "-bottom"
|
37 | );
|
38 |
|
39 | @mixin undirected-spacing($property, $size-namespace, $size) {
|
40 | .#{$property}#{$size-namespace} {
|
41 | #{$property}: $size !important;
|
42 | }
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | @each $property in $spacing-properties {
|
53 | @each $size-namespace, $size in $spacing-sizes {
|
54 | @include undirected-spacing($property, $size-namespace, $size);
|
55 | }
|
56 | }
|