@matteusan/himig 1.7.3 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,16 @@
11
11
  $_breakpoints: consts.$breakpoints;
12
12
  $_displays: ('none', 'block', 'inline', 'inline-block', 'flex', 'inline-flex', 'grid', 'inline-grid');
13
13
  $_positions: ('static', 'relative', 'absolute', 'fixed', 'sticky');
14
- $_alignments: ('start', 'center', 'end', 'stretch', 'baseline', 'space-between', 'space-around', 'space-evenly');
14
+ $_alignments: (
15
+ 'start': 'flex-start',
16
+ 'center': 'center',
17
+ 'end': 'flex-end',
18
+ 'stretch': 'stretch',
19
+ 'baseline': 'baseline',
20
+ 'space-between': 'space-between',
21
+ 'space-around': 'space-around',
22
+ 'space-evenly': 'space-evenly'
23
+ );
15
24
  $_flows: ('row', 'column', 'row-reverse', 'column-reverse');
16
25
  $_wraps: ('none': 'nowrap', 'default': 'wrap','reverse': 'wrap-reverse');
17
26
  $_max-columns: 12;
@@ -49,238 +58,240 @@ $_gaps: (
49
58
  'gap',
50
59
  ), $include, $exclude);
51
60
 
52
- @if list.index($utils-to-render, 'display') {
53
- @each $display in $_displays {
54
- .#{$display} {
55
- display: string.unquote($display);
56
- }
61
+ @layer utils {
62
+ @if list.index($utils-to-render, 'display') {
63
+ @each $display in $_displays {
64
+ .#{$display} {
65
+ display: string.unquote($display);
66
+ }
57
67
 
58
- @each $breakpoint in $_breakpoints {
59
- .\@#{$breakpoint}\:#{$display} {
60
- @include pintig.breakpoint-create($breakpoint) {
61
- display: string.unquote($display) !important;
68
+ @each $breakpoint in $_breakpoints {
69
+ .\@#{$breakpoint}\:#{$display} {
70
+ @include pintig.breakpoint-create($breakpoint) {
71
+ display: string.unquote($display) !important;
72
+ }
62
73
  }
63
74
  }
64
75
  }
65
76
  }
66
- }
67
77
 
68
- @if list.index($utils-to-render, 'position') {
69
- @each $position in $_positions {
70
- .#{$position} {
71
- position: string.unquote($position);
72
- }
78
+ @if list.index($utils-to-render, 'position') {
79
+ @each $position in $_positions {
80
+ .#{$position} {
81
+ position: string.unquote($position);
82
+ }
73
83
 
74
- @each $breakpoint in $_breakpoints {
75
- .\@#{$breakpoint}\:#{$position} {
76
- @include pintig.breakpoint-create($breakpoint) {
77
- position: string.unquote($position) !important;
84
+ @each $breakpoint in $_breakpoints {
85
+ .\@#{$breakpoint}\:#{$position} {
86
+ @include pintig.breakpoint-create($breakpoint) {
87
+ position: string.unquote($position) !important;
88
+ }
78
89
  }
79
90
  }
80
91
  }
81
92
  }
82
- }
83
93
 
84
- @if list.index($utils-to-render, 'flow') {
85
- @each $flow in $_flows {
86
- .flow-#{$flow} {
87
- flex-flow: string.unquote($flow);
88
- }
94
+ @if list.index($utils-to-render, 'flow') {
95
+ @each $flow in $_flows {
96
+ .flow-#{$flow} {
97
+ flex-flow: string.unquote($flow);
98
+ }
89
99
 
90
- @each $breakpoint in $_breakpoints {
91
- .\@#{$breakpoint}\:flow-#{$flow} {
92
- @include pintig.breakpoint-create($breakpoint) {
93
- flex-flow: string.unquote($flow) !important;
100
+ @each $breakpoint in $_breakpoints {
101
+ .\@#{$breakpoint}\:flow-#{$flow} {
102
+ @include pintig.breakpoint-create($breakpoint) {
103
+ flex-flow: string.unquote($flow) !important;
104
+ }
94
105
  }
95
106
  }
96
107
  }
97
108
  }
98
- }
99
109
 
100
- @if list.index($utils-to-render, 'wrap') {
101
- @each $wrap, $value in $_wraps {
102
- @if $wrap == 'default' {
103
- .wrap {
104
- flex-wrap: string.unquote($value);
105
- }
106
- } @else {
107
- .wrap-#{$wrap} {
108
- flex-wrap: string.unquote($value);
109
- }
110
- }
111
-
112
- @each $breakpoint in $_breakpoints {
110
+ @if list.index($utils-to-render, 'wrap') {
111
+ @each $wrap, $value in $_wraps {
113
112
  @if $wrap == 'default' {
114
- .\@#{$breakpoint}\:wrap {
115
- @include pintig.breakpoint-create($breakpoint) {
116
- flex-wrap: string.unquote($value) !important;
117
- }
113
+ .wrap {
114
+ flex-wrap: string.unquote($value);
118
115
  }
119
116
  } @else {
120
- .\@#{$breakpoint}\:wrap-#{$wrap} {
121
- @include pintig.breakpoint-create($breakpoint) {
122
- flex-wrap: string.unquote($value) !important;
117
+ .wrap-#{$wrap} {
118
+ flex-wrap: string.unquote($value);
119
+ }
120
+ }
121
+
122
+ @each $breakpoint in $_breakpoints {
123
+ @if $wrap == 'default' {
124
+ .\@#{$breakpoint}\:wrap {
125
+ @include pintig.breakpoint-create($breakpoint) {
126
+ flex-wrap: string.unquote($value) !important;
127
+ }
128
+ }
129
+ } @else {
130
+ .\@#{$breakpoint}\:wrap-#{$wrap} {
131
+ @include pintig.breakpoint-create($breakpoint) {
132
+ flex-wrap: string.unquote($value) !important;
133
+ }
123
134
  }
124
135
  }
125
136
  }
126
137
  }
127
138
  }
128
- }
129
139
 
130
- @each $alignment in $_alignments {
131
- @if list.index($utils-to-render, 'jc') {
132
- .jc-#{$alignment} {
133
- justify-content: string.unquote($alignment);
134
- }
140
+ @each $alignment, $alignment-val in $_alignments {
141
+ @if list.index($utils-to-render, 'jc') {
142
+ .jc-#{$alignment} {
143
+ justify-content: string.unquote($alignment-val);
144
+ }
135
145
 
136
- @each $breakpoint in $_breakpoints {
137
- .\@#{$breakpoint}\:jc-#{$alignment} {
138
- @include pintig.breakpoint-create($breakpoint) {
139
- justify-content: string.unquote($alignment) !important;
146
+ @each $breakpoint in $_breakpoints {
147
+ .\@#{$breakpoint}\:jc-#{$alignment} {
148
+ @include pintig.breakpoint-create($breakpoint) {
149
+ justify-content: string.unquote($alignment-val) !important;
150
+ }
140
151
  }
141
152
  }
142
153
  }
143
- }
144
154
 
145
- @if list.index($utils-to-render, 'ji') {
146
- .ji-#{$alignment} {
147
- justify-items: string.unquote($alignment);
148
- }
155
+ @if list.index($utils-to-render, 'ji') {
156
+ .ji-#{$alignment} {
157
+ justify-items: string.unquote($alignment);
158
+ }
149
159
 
150
- @each $breakpoint in $_breakpoints {
151
- .\@#{$breakpoint}\:ji-#{$alignment} {
152
- @include pintig.breakpoint-create($breakpoint) {
153
- justify-items: string.unquote($alignment) !important;
160
+ @each $breakpoint in $_breakpoints {
161
+ .\@#{$breakpoint}\:ji-#{$alignment} {
162
+ @include pintig.breakpoint-create($breakpoint) {
163
+ justify-items: string.unquote($alignment) !important;
164
+ }
154
165
  }
155
166
  }
156
167
  }
157
- }
158
168
 
159
- @if list.index($utils-to-render, 'ac') {
160
- .ac-#{$alignment} {
161
- align-content: string.unquote($alignment);
162
- }
169
+ @if list.index($utils-to-render, 'ac') {
170
+ .ac-#{$alignment} {
171
+ align-content: string.unquote($alignment);
172
+ }
163
173
 
164
- @each $breakpoint in $_breakpoints {
165
- .\@#{$breakpoint}\:ac-#{$alignment} {
166
- @include pintig.breakpoint-create($breakpoint) {
167
- align-content: string.unquote($alignment) !important;
174
+ @each $breakpoint in $_breakpoints {
175
+ .\@#{$breakpoint}\:ac-#{$alignment} {
176
+ @include pintig.breakpoint-create($breakpoint) {
177
+ align-content: string.unquote($alignment) !important;
178
+ }
168
179
  }
169
180
  }
170
181
  }
171
- }
172
182
 
173
- @if list.index($utils-to-render, 'ai') {
174
- .ai-#{$alignment} {
175
- align-items: string.unquote($alignment);
176
- }
183
+ @if list.index($utils-to-render, 'ai') {
184
+ .ai-#{$alignment} {
185
+ align-items: string.unquote($alignment);
186
+ }
177
187
 
178
- @each $breakpoint in $_breakpoints {
179
- .\@#{$breakpoint}\:ai-#{$alignment} {
180
- @include pintig.breakpoint-create($breakpoint) {
181
- align-items: string.unquote($alignment) !important;
188
+ @each $breakpoint in $_breakpoints {
189
+ .\@#{$breakpoint}\:ai-#{$alignment} {
190
+ @include pintig.breakpoint-create($breakpoint) {
191
+ align-items: string.unquote($alignment) !important;
192
+ }
182
193
  }
183
194
  }
184
195
  }
185
- }
186
196
 
187
- @if list.index($utils-to-render, 'pc') {
188
- .pc-#{$alignment} {
189
- place-content: string.unquote($alignment);
190
- }
197
+ @if list.index($utils-to-render, 'pc') {
198
+ .pc-#{$alignment} {
199
+ place-content: string.unquote($alignment);
200
+ }
191
201
 
192
- @each $breakpoint in $_breakpoints {
193
- .\@#{$breakpoint}\:pc-#{$alignment} {
194
- @include pintig.breakpoint-create($breakpoint) {
195
- place-content: string.unquote($alignment) !important;
202
+ @each $breakpoint in $_breakpoints {
203
+ .\@#{$breakpoint}\:pc-#{$alignment} {
204
+ @include pintig.breakpoint-create($breakpoint) {
205
+ place-content: string.unquote($alignment) !important;
206
+ }
196
207
  }
197
208
  }
198
209
  }
199
- }
200
210
 
201
- @if list.index($utils-to-render, 'pi') {
202
- .pi-#{$alignment} {
203
- place-items: string.unquote($alignment);
204
- }
211
+ @if list.index($utils-to-render, 'pi') {
212
+ .pi-#{$alignment} {
213
+ place-items: string.unquote($alignment);
214
+ }
205
215
 
206
- @each $breakpoint in $_breakpoints {
207
- .\@#{$breakpoint}\:pi-#{$alignment} {
208
- @include pintig.breakpoint-create($breakpoint) {
209
- place-items: string.unquote($alignment) !important;
216
+ @each $breakpoint in $_breakpoints {
217
+ .\@#{$breakpoint}\:pi-#{$alignment} {
218
+ @include pintig.breakpoint-create($breakpoint) {
219
+ place-items: string.unquote($alignment) !important;
220
+ }
210
221
  }
211
222
  }
212
223
  }
213
224
  }
214
- }
215
225
 
216
- @for $i from 1 through $_max-columns {
217
- @if list.index($utils-to-render, 'cols') {
218
- .cols-#{$i} {
219
- grid-template-columns: repeat($i, 1fr);
220
- }
226
+ @for $i from 1 through $_max-columns {
227
+ @if list.index($utils-to-render, 'cols') {
228
+ .cols-#{$i} {
229
+ grid-template-columns: repeat($i, 1fr);
230
+ }
221
231
 
222
- @each $breakpoint in $_breakpoints {
223
- .\@#{$breakpoint}\:cols-#{$i} {
224
- @include pintig.breakpoint-create($breakpoint) {
225
- grid-template-columns: repeat($i, 1fr) !important;
232
+ @each $breakpoint in $_breakpoints {
233
+ .\@#{$breakpoint}\:cols-#{$i} {
234
+ @include pintig.breakpoint-create($breakpoint) {
235
+ grid-template-columns: repeat($i, 1fr) !important;
236
+ }
226
237
  }
227
238
  }
228
239
  }
229
- }
230
240
 
231
- @if list.index($utils-to-render, 'rows') {
232
- .rows-#{$i} {
233
- grid-template-rows: repeat($i, 1fr);
234
- }
241
+ @if list.index($utils-to-render, 'rows') {
242
+ .rows-#{$i} {
243
+ grid-template-rows: repeat($i, 1fr);
244
+ }
235
245
 
236
- @each $breakpoint in $_breakpoints {
237
- .\@#{$breakpoint}\:rows-#{$i} {
238
- @include pintig.breakpoint-create($breakpoint) {
239
- grid-template-rows: repeat($i, 1fr) !important;
246
+ @each $breakpoint in $_breakpoints {
247
+ .\@#{$breakpoint}\:rows-#{$i} {
248
+ @include pintig.breakpoint-create($breakpoint) {
249
+ grid-template-rows: repeat($i, 1fr) !important;
250
+ }
240
251
  }
241
252
  }
242
253
  }
243
- }
244
254
 
245
- @if list.index($utils-to-render, 'start') {
246
- .start-#{$i} {
247
- grid-column-start: $i;
248
- }
255
+ @if list.index($utils-to-render, 'start') {
256
+ .start-#{$i} {
257
+ grid-column-start: $i;
258
+ }
249
259
 
250
- @each $breakpoint in $_breakpoints {
251
- .\@#{$breakpoint}\:start-#{$i} {
252
- @include pintig.breakpoint-create($breakpoint) {
253
- grid-column-start: $i !important;
260
+ @each $breakpoint in $_breakpoints {
261
+ .\@#{$breakpoint}\:start-#{$i} {
262
+ @include pintig.breakpoint-create($breakpoint) {
263
+ grid-column-start: $i !important;
264
+ }
254
265
  }
255
266
  }
256
267
  }
257
- }
258
268
 
259
- @if list.index($utils-to-render, 'end') {
260
- .end-#{$i} {
261
- grid-column-end: $i + 1;
262
- }
269
+ @if list.index($utils-to-render, 'end') {
270
+ .end-#{$i} {
271
+ grid-column-end: $i + 1;
272
+ }
263
273
 
264
- @each $breakpoint in $_breakpoints {
265
- .\@#{$breakpoint}\:end-#{$i} {
266
- @include pintig.breakpoint-create($breakpoint) {
267
- grid-column-end: $i + 1 !important;
274
+ @each $breakpoint in $_breakpoints {
275
+ .\@#{$breakpoint}\:end-#{$i} {
276
+ @include pintig.breakpoint-create($breakpoint) {
277
+ grid-column-end: $i + 1 !important;
278
+ }
268
279
  }
269
280
  }
270
281
  }
271
282
  }
272
- }
273
283
 
274
- @if list.index($utils-to-render, 'gap') {
275
- @each $gap in $_gaps {
276
- .gap-#{$gap} {
277
- gap: pintig.primitive-token-get('gap.#{$gap}');
278
- }
284
+ @if list.index($utils-to-render, 'gap') {
285
+ @each $gap in $_gaps {
286
+ .gap-#{$gap} {
287
+ gap: pintig.primitive-token-get('gap.#{$gap}');
288
+ }
279
289
 
280
- @each $breakpoint in $_breakpoints {
281
- .\@#{$breakpoint}\:gap-#{$gap} {
282
- @include pintig.breakpoint-create($breakpoint) {
283
- gap: pintig.primitive-token-get('gap.#{$gap}') !important;
290
+ @each $breakpoint in $_breakpoints {
291
+ .\@#{$breakpoint}\:gap-#{$gap} {
292
+ @include pintig.breakpoint-create($breakpoint) {
293
+ gap: pintig.primitive-token-get('gap.#{$gap}') !important;
294
+ }
284
295
  }
285
296
  }
286
297
  }