Debian Codegraph @

style/_spacing.scss

raw
1 $spacer: 1rem;
2 $spacings: (
3 0: 0,
4 1: $spacer * 0.25,
5 2: $spacer * 0.5,
6 3: $spacer,
7 4: $spacer * 1.5,
8 5: $spacer * 3,
9 ) !default;
10
11 $media-min-sm: 576px;
12 $media-min-md: 768px;
13 $media-min-lg: 992px;
14 $media-min-xl: 1200px;
15
16 $media-max-sm: 540px;
17 $media-max-md: 720px;
18 $media-max-lg: 960px;
19 $media-max-xl: 1140px;
20
21 $media-widths: (
22 "sm": $media-min-sm,
23 "md": $media-min-md,
24 "lg": $media-min-lg,
25 "xl": $media-min-xl,
26 ) !default;
27
28 @each $id, $value in $spacings {
29 .sd-p-#{$id} {
30 padding: $value !important;
31 }
32
33 .sd-pt-#{$id},
34 .sd-py-#{$id} {
35 padding-top: $value !important;
36 }
37
38 .sd-pr-#{$id},
39 .sd-px-#{$id} {
40 padding-right: $value !important;
41 }
42
43 .sd-pb-#{$id},
44 .sd-py-#{$id} {
45 padding-bottom: $value !important;
46 }
47
48 .sd-pl-#{$id},
49 .sd-px-#{$id} {
50 padding-left: $value !important;
51 }
52 }
53
54 .sd-m-auto {
55 margin: auto !important;
56 }
57
58 .sd-mt-auto,
59 .sd-my-auto {
60 margin-top: auto !important;
61 }
62
63 .sd-mr-auto,
64 .sd-mx-auto {
65 margin-right: auto !important;
66 }
67
68 .sd-mb-auto,
69 .sd-my-auto {
70 margin-bottom: auto !important;
71 }
72
73 .sd-ml-auto,
74 .sd-mx-auto {
75 margin-left: auto !important;
76 }
77
78 @each $id, $value in $spacings {
79 .sd-m-#{$id} {
80 margin: $value !important;
81 }
82
83 .sd-mt-#{$id},
84 .sd-my-#{$id} {
85 margin-top: $value !important;
86 }
87
88 .sd-mr-#{$id},
89 .sd-mx-#{$id} {
90 margin-right: $value !important;
91 }
92
93 .sd-mb-#{$id},
94 .sd-my-#{$id} {
95 margin-bottom: $value !important;
96 }
97
98 .sd-ml-#{$id},
99 .sd-mx-#{$id} {
100 margin-left: $value !important;
101 }
102 }