1 | @use '../internal' as *;
|
2 |
|
3 | @each $class, $size in $spacing-system {
|
4 |
|
5 | .m-#{$class} {
|
6 | margin: $size !important;
|
7 | }
|
8 |
|
9 | .mt-#{$class},
|
10 | .my-#{$class} {
|
11 | margin-top: $size !important;
|
12 | }
|
13 | .mb-#{$class},
|
14 | .my-#{$class} {
|
15 | margin-bottom: $size !important;
|
16 | }
|
17 |
|
18 | .ml-#{$class},
|
19 | .mx-#{$class} {
|
20 | margin-left: $size !important;
|
21 | }
|
22 | .mr-#{$class},
|
23 | .mx-#{$class} {
|
24 | margin-right: $size !important;
|
25 | }
|
26 |
|
27 |
|
28 | .p-#{$class} {
|
29 | padding: $size !important;
|
30 | }
|
31 |
|
32 | .pt-#{$class},
|
33 | .py-#{$class} {
|
34 | padding-top: $size !important;
|
35 | }
|
36 | .pb-#{$class},
|
37 | .py-#{$class} {
|
38 | padding-bottom: $size !important;
|
39 | }
|
40 |
|
41 | .pl-#{$class},
|
42 | .px-#{$class} {
|
43 | padding-left: $size !important;
|
44 | }
|
45 | .pr-#{$class},
|
46 | .px-#{$class} {
|
47 | padding-right: $size !important;
|
48 | }
|
49 | }
|
50 |
|
51 | .ml-auto,
|
52 | .mx-auto {
|
53 | margin-left: auto !important;
|
54 | }
|
55 |
|
56 | .mr-auto,
|
57 | .mx-auto {
|
58 | margin-right: auto !important;
|
59 | }
|
60 |
|
61 | .mt-auto,
|
62 | .my-auto {
|
63 | margin-top: auto !important;
|
64 | }
|
65 |
|
66 | .mb-auto,
|
67 | .my-auto {
|
68 | margin-bottom: auto !important;
|
69 | }
|
70 |
|
71 | @if get-viewport-flag($MARGIN-PADDING) == true {
|
72 |
|
73 | @each $suffix, $limit in $breakpoint-pairs {
|
74 | @each $class, $size in $spacing-system {
|
75 | @include screen-above($limit) {
|
76 |
|
77 | .m-#{$class}-#{$suffix} {
|
78 | margin: $size !important;
|
79 | }
|
80 |
|
81 | .mt-#{$class}-#{$suffix},
|
82 | .my-#{$class}-#{$suffix} {
|
83 | margin-top: $size !important;
|
84 | }
|
85 | .mb-#{$class}-#{$suffix},
|
86 | .my-#{$class}-#{$suffix} {
|
87 | margin-bottom: $size !important;
|
88 | }
|
89 |
|
90 | .ml-#{$class}-#{$suffix},
|
91 | .mx-#{$class}-#{$suffix} {
|
92 | margin-left: $size !important;
|
93 | }
|
94 | .mr-#{$class}-#{$suffix},
|
95 | .mx-#{$class}-#{$suffix} {
|
96 | margin-right: $size !important;
|
97 | }
|
98 |
|
99 |
|
100 | .p-#{$class}-#{$suffix} {
|
101 | padding: $size !important;
|
102 | }
|
103 |
|
104 | .pt-#{$class}-#{$suffix},
|
105 | .py-#{$class}-#{$suffix} {
|
106 | padding-top: $size !important;
|
107 | }
|
108 | .pb-#{$class}-#{$suffix},
|
109 | .py-#{$class}-#{$suffix} {
|
110 | padding-bottom: $size !important;
|
111 | }
|
112 |
|
113 | .pl-#{$class}-#{$suffix},
|
114 | .px-#{$class}-#{$suffix} {
|
115 | padding-left: $size !important;
|
116 | }
|
117 | .pr-#{$class}-#{$suffix},
|
118 | .px-#{$class}-#{$suffix} {
|
119 | padding-right: $size !important;
|
120 | }
|
121 |
|
122 | .ml-auto-#{$suffix},
|
123 | .mx-auto-#{$suffix} {
|
124 | margin-left: auto !important;
|
125 | }
|
126 |
|
127 | .mr-auto-#{$suffix},
|
128 | .mx-auto-#{$suffix} {
|
129 | margin-right: auto !important;
|
130 | }
|
131 |
|
132 | .mt-auto-#{$suffix},
|
133 | .my-auto-#{$suffix} {
|
134 | margin-top: auto !important;
|
135 | }
|
136 |
|
137 | .mb-auto-#{$suffix},
|
138 | .my-auto-#{$suffix} {
|
139 | margin-bottom: auto !important;
|
140 | }
|
141 | }
|
142 | }
|
143 | }
|
144 | }
|