-
Notifications
You must be signed in to change notification settings - Fork 754
/
Copy path_spacing.scss
52 lines (49 loc) · 913 Bytes
/
_spacing.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@use "sass:map";
$spacer: 1rem !default;
$spacers: () !default;
$spacers: map.merge(
(
0: 0,
1: (
$spacer * 0.25,
),
2: (
$spacer * 0.5,
),
3: $spacer,
4: (
$spacer * 1.5,
),
5: (
$spacer * 2,
),
6: (
$spacer * 3,
),
),
$spacers
);
// Margin and Padding
@each $prop, $abbrev in (margin: m, padding: p) {
@each $size, $length in $spacers {
.#{$abbrev}-#{$size} {
#{$prop}: $length !important;
}
.#{$abbrev}t-#{$size},
.#{$abbrev}y-#{$size} {
#{$prop}-top: $length !important;
}
.#{$abbrev}r-#{$size},
.#{$abbrev}x-#{$size} {
#{$prop}-right: $length !important;
}
.#{$abbrev}b-#{$size},
.#{$abbrev}y-#{$size} {
#{$prop}-bottom: $length !important;
}
.#{$abbrev}l-#{$size},
.#{$abbrev}x-#{$size} {
#{$prop}-left: $length !important;
}
}
}