crayon-css 0.2.1 → 0.2.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crayon-css",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "A Sass utility CSS toolkit.",
5
5
  "sass": "src/crayon.scss",
6
6
  "files": [
@@ -1,22 +1,24 @@
1
- .sr-only {
2
- position: absolute;
3
- width: 1px;
4
- height: 1px;
5
- padding: 0;
6
- margin: -1px;
7
- overflow: hidden;
8
- clip: rect(0, 0, 0, 0);
9
- white-space: nowrap;
10
- border-width: 0;
11
- }
1
+ @layer utilities {
2
+ .sr-only {
3
+ position: absolute;
4
+ width: 1px;
5
+ height: 1px;
6
+ padding: 0;
7
+ margin: -1px;
8
+ overflow: hidden;
9
+ clip: rect(0, 0, 0, 0);
10
+ white-space: nowrap;
11
+ border-width: 0;
12
+ }
12
13
 
13
- .not-sr-only {
14
- position: static;
15
- width: auto;
16
- height: auto;
17
- padding: 0;
18
- margin: 0;
19
- overflow: visible;
20
- clip: auto;
21
- white-space: normal;
14
+ .not-sr-only {
15
+ position: static;
16
+ width: auto;
17
+ height: auto;
18
+ padding: 0;
19
+ margin: 0;
20
+ overflow: visible;
21
+ clip: auto;
22
+ white-space: normal;
23
+ }
22
24
  }
package/src/_borders.scss CHANGED
@@ -57,21 +57,23 @@
57
57
  }
58
58
  }
59
59
 
60
- @each $key, $width in config.$border-widths {
61
- @if $key == "DEFAULT" {
62
- @include _border-width-classes("", $width);
63
- } @else {
64
- @include _border-width-classes($key, $width);
60
+ @layer utilities {
61
+ @each $key, $width in config.$border-widths {
62
+ @if $key == "DEFAULT" {
63
+ @include _border-width-classes("", $width);
64
+ } @else {
65
+ @include _border-width-classes($key, $width);
66
+ }
65
67
  }
66
- }
67
68
 
68
- // ─── Border Radius ────────────────────────────────────────────────────────────
69
+ // ─── Border Radius ────────────────────────────────────────────────────────────
69
70
 
70
- @each $key, $radius in config.$border-radii {
71
- $rem: if($radius == 0 or $radius == 9999px, $radius, utility.px-to-rem($radius));
72
- @if $key == "DEFAULT" {
73
- .rounded { border-radius: $rem; }
74
- } @else {
75
- .rounded-#{$key} { border-radius: $rem; }
71
+ @each $key, $radius in config.$border-radii {
72
+ $rem: if($radius == 0 or $radius == 9999px, $radius, utility.px-to-rem($radius));
73
+ @if $key == "DEFAULT" {
74
+ .rounded { border-radius: $rem; }
75
+ } @else {
76
+ .rounded-#{$key} { border-radius: $rem; }
77
+ }
76
78
  }
77
79
  }
package/src/_colors.scss CHANGED
@@ -65,16 +65,18 @@
65
65
  }
66
66
  }
67
67
 
68
- @each $name, $value in config.$colors {
69
- .bg-#{$name} {
70
- background-color: convert($value);
71
- }
68
+ @layer utilities {
69
+ @each $name, $value in config.$colors {
70
+ .bg-#{$name} {
71
+ background-color: convert($value);
72
+ }
72
73
 
73
- .text-#{$name} {
74
- color: convert($value);
75
- }
74
+ .text-#{$name} {
75
+ color: convert($value);
76
+ }
76
77
 
77
- .border-#{$name} {
78
- border-color: convert($value);
78
+ .border-#{$name} {
79
+ border-color: convert($value);
80
+ }
79
81
  }
80
82
  }
package/src/_display.scss CHANGED
@@ -2,33 +2,35 @@
2
2
  @use "config";
3
3
  @use "utility";
4
4
 
5
- .block {
6
- display: block;
7
- }
5
+ @layer utilities {
6
+ .block {
7
+ display: block;
8
+ }
8
9
 
9
- .inline {
10
- display: inline;
11
- }
10
+ .inline {
11
+ display: inline;
12
+ }
12
13
 
13
- .inline-block {
14
- display: inline-block;
15
- }
14
+ .inline-block {
15
+ display: inline-block;
16
+ }
16
17
 
17
- .hidden,
18
- .hide {
19
- display: none;
20
- }
18
+ .hidden,
19
+ .hide {
20
+ display: none;
21
+ }
21
22
 
22
- // ─── Container ────────────────────────────────────────────────────────────────
23
+ // ─── Container ────────────────────────────────────────────────────────────────
23
24
 
24
- .container {
25
- width: 100%;
26
- margin-left: auto;
27
- margin-right: auto;
25
+ .container {
26
+ width: 100%;
27
+ margin-left: auto;
28
+ margin-right: auto;
28
29
 
29
- @each $name, $breakpoint in config.$breakpoints {
30
- @media (min-width: #{$breakpoint}) {
31
- max-width: $breakpoint;
30
+ @each $name, $breakpoint in config.$breakpoints {
31
+ @media (min-width: #{$breakpoint}) {
32
+ max-width: $breakpoint;
33
+ }
32
34
  }
33
35
  }
34
36
  }
package/src/_flex.scss CHANGED
@@ -1,14 +1,4 @@
1
- // ─── Display ──────────────────────────────────────────────────────────────────
2
-
3
- .flex {
4
- display: flex;
5
- }
6
-
7
- .inline-flex {
8
- display: inline-flex;
9
- }
10
-
11
- // ─── Direction ────────────────────────────────────────────────────────────────
1
+ // ─── Direction (map needed before @layer for @extend) ─────────────────────────
12
2
 
13
3
  $flex: (
14
4
  "row": row,
@@ -17,44 +7,58 @@ $flex: (
17
7
  "col-reverse": column-reverse,
18
8
  );
19
9
 
20
- @each $name, $dir in $flex {
21
- .flex-#{$name} {
22
- flex-direction: $dir;
10
+ @layer utilities {
11
+ // ─── Display ──────────────────────────────────────────────────────────────────
12
+
13
+ .flex {
14
+ display: flex;
23
15
  }
24
16
 
25
- .f-#{$name} {
26
- @extend .flex-#{$name};
17
+ .inline-flex {
18
+ display: inline-flex;
27
19
  }
28
- }
29
20
 
30
- // ─── Grow & shrink ────────────────────────────────────────────────────────────
21
+ // ─── Direction ────────────────────────────────────────────────────────────────
31
22
 
32
- .grow {
33
- flex-grow: 1;
34
- }
23
+ @each $name, $dir in $flex {
24
+ .flex-#{$name} {
25
+ flex-direction: $dir;
26
+ }
35
27
 
36
- .no-grow,
37
- .grow-0 {
38
- flex-grow: 0;
39
- }
28
+ .f-#{$name} {
29
+ @extend .flex-#{$name};
30
+ }
31
+ }
40
32
 
41
- .shrink {
42
- flex-shrink: 1;
43
- }
33
+ // ─── Grow & shrink ────────────────────────────────────────────────────────────
44
34
 
45
- .no-shrink,
46
- .shrink-0 {
47
- flex-shrink: 0;
48
- }
35
+ .grow {
36
+ flex-grow: 1;
37
+ }
49
38
 
50
- // ─── Wrap ─────────────────────────────────────────────────────────────────────
39
+ .no-grow,
40
+ .grow-0 {
41
+ flex-grow: 0;
42
+ }
51
43
 
52
- .flex-wrap {
53
- flex-wrap: wrap;
54
- }
55
- .flex-wrap-reverse {
56
- flex-wrap: wrap-reverse;
57
- }
58
- .flex-nowrap {
59
- flex-wrap: nowrap;
44
+ .shrink {
45
+ flex-shrink: 1;
46
+ }
47
+
48
+ .no-shrink,
49
+ .shrink-0 {
50
+ flex-shrink: 0;
51
+ }
52
+
53
+ // ─── Wrap ─────────────────────────────────────────────────────────────────────
54
+
55
+ .flex-wrap {
56
+ flex-wrap: wrap;
57
+ }
58
+ .flex-wrap-reverse {
59
+ flex-wrap: wrap-reverse;
60
+ }
61
+ .flex-nowrap {
62
+ flex-wrap: nowrap;
63
+ }
60
64
  }
package/src/_grid.scss CHANGED
@@ -1,93 +1,95 @@
1
1
  @use "config";
2
2
 
3
- .grid {
4
- display: grid;
5
- }
3
+ @layer utilities {
4
+ .grid {
5
+ display: grid;
6
+ }
6
7
 
7
- // ─── Grid template columns ────────────────────────────────────────────────────
8
+ // ─── Grid template columns ────────────────────────────────────────────────────
8
9
 
9
- @for $column from 1 through config.$layout-columns {
10
- .grid-cols-#{$column} {
11
- grid-template-columns: repeat(#{$column}, minmax(0, 1fr));
10
+ @for $column from 1 through config.$layout-columns {
11
+ .grid-cols-#{$column} {
12
+ grid-template-columns: repeat(#{$column}, minmax(0, 1fr));
13
+ }
12
14
  }
13
- }
14
15
 
15
- .grid-cols-none {
16
- grid-template-columns: none;
17
- }
16
+ .grid-cols-none {
17
+ grid-template-columns: none;
18
+ }
18
19
 
19
- // ─── Column & row span ────────────────────────────────────────────────────────
20
+ // ─── Column & row span ────────────────────────────────────────────────────────
20
21
 
21
- @for $columns from 1 through config.$layout-columns {
22
- .col-span-#{$columns} {
23
- grid-column: span #{$columns} / span #{$columns};
22
+ @for $columns from 1 through config.$layout-columns {
23
+ .col-span-#{$columns} {
24
+ grid-column: span #{$columns} / span #{$columns};
25
+ }
26
+ .row-span-#{$columns} {
27
+ grid-row: span #{$columns} / span #{$columns};
28
+ }
24
29
  }
25
- .row-span-#{$columns} {
26
- grid-row: span #{$columns} / span #{$columns};
27
- }
28
- }
29
30
 
30
- .col-span-full {
31
- grid-column: 1 / -1;
32
- }
33
- .row-span-full {
34
- grid-row: 1 / -1;
35
- }
31
+ .col-span-full {
32
+ grid-column: 1 / -1;
33
+ }
34
+ .row-span-full {
35
+ grid-row: 1 / -1;
36
+ }
36
37
 
37
- // ─── Grid template rows ───────────────────────────────────────────────────────
38
+ // ─── Grid template rows ───────────────────────────────────────────────────────
38
39
 
39
- @for $row from 1 through config.$layout-columns {
40
- .grid-rows-#{$row} {
41
- grid-template-rows: repeat(#{$row}, minmax(0, 1fr));
40
+ @for $row from 1 through config.$layout-columns {
41
+ .grid-rows-#{$row} {
42
+ grid-template-rows: repeat(#{$row}, minmax(0, 1fr));
43
+ }
42
44
  }
43
- }
44
45
 
45
- .grid-rows-none {
46
- grid-template-rows: none;
47
- }
46
+ .grid-rows-none {
47
+ grid-template-rows: none;
48
+ }
48
49
 
49
- // ─── Auto columns & rows ──────────────────────────────────────────────────────
50
+ // ─── Auto columns & rows ──────────────────────────────────────────────────────
50
51
 
51
- .auto-cols-auto {
52
- grid-auto-columns: auto;
53
- }
54
- .auto-cols-min {
55
- grid-auto-columns: min-content;
56
- }
57
- .auto-cols-max {
58
- grid-auto-columns: max-content;
59
- }
60
- .auto-cols-fr {
61
- grid-auto-columns: minmax(0, 1fr);
62
- }
52
+ .auto-cols-auto {
53
+ grid-auto-columns: auto;
54
+ }
55
+ .auto-cols-min {
56
+ grid-auto-columns: min-content;
57
+ }
58
+ .auto-cols-max {
59
+ grid-auto-columns: max-content;
60
+ }
61
+ .auto-cols-fr {
62
+ grid-auto-columns: minmax(0, 1fr);
63
+ }
63
64
 
64
- .auto-rows-auto {
65
- grid-auto-rows: auto;
66
- }
67
- .auto-rows-min {
68
- grid-auto-rows: min-content;
69
- }
70
- .auto-rows-max {
71
- grid-auto-rows: max-content;
72
- }
73
- .auto-rows-fr {
74
- grid-auto-rows: minmax(0, 1fr);
75
- }
65
+ .auto-rows-auto {
66
+ grid-auto-rows: auto;
67
+ }
68
+ .auto-rows-min {
69
+ grid-auto-rows: min-content;
70
+ }
71
+ .auto-rows-max {
72
+ grid-auto-rows: max-content;
73
+ }
74
+ .auto-rows-fr {
75
+ grid-auto-rows: minmax(0, 1fr);
76
+ }
76
77
 
77
- // ─── Grid auto flow ───────────────────────────────────────────────────────────
78
+ // ─── Grid auto flow ───────────────────────────────────────────────────────────
78
79
 
79
- .grid-flow-row {
80
- grid-auto-flow: row;
81
- }
82
- .grid-flow-col {
83
- grid-auto-flow: column;
84
- }
85
- .grid-flow-dense {
86
- grid-auto-flow: dense;
87
- }
88
- .grid-flow-row-dense {
89
- grid-auto-flow: row dense;
90
- }
91
- .grid-flow-col-dense {
92
- grid-auto-flow: column dense;
80
+ .grid-flow-row {
81
+ grid-auto-flow: row;
82
+ }
83
+ .grid-flow-col {
84
+ grid-auto-flow: column;
85
+ }
86
+ .grid-flow-dense {
87
+ grid-auto-flow: dense;
88
+ }
89
+ .grid-flow-row-dense {
90
+ grid-auto-flow: row dense;
91
+ }
92
+ .grid-flow-col-dense {
93
+ grid-auto-flow: column dense;
94
+ }
93
95
  }
package/src/_reset.scss CHANGED
@@ -30,8 +30,8 @@ dd {
30
30
  }
31
31
 
32
32
  /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
33
- ul[role='list'],
34
- ol[role='list'] {
33
+ ul[role="list"],
34
+ ol[role="list"] {
35
35
  list-style: none;
36
36
  }
37
37
 
@@ -44,6 +44,11 @@ body {
44
44
  font-weight: typography.font-weight("normal");
45
45
  }
46
46
 
47
+ /* Table */
48
+ table {
49
+ border-collapse: collapse;
50
+ }
51
+
47
52
  /* Set shorter line heights on headings and interactive elements */
48
53
  h1,
49
54
  h2,
@@ -63,6 +68,10 @@ h4 {
63
68
  text-wrap: balance;
64
69
  }
65
70
 
71
+ p {
72
+ margin: 0;
73
+ }
74
+
66
75
  /*
67
76
  Text-level semantics
68
77
  ====================
@@ -87,12 +96,7 @@ kbd,
87
96
  samp,
88
97
  pre {
89
98
  font-family:
90
- ui-monospace,
91
- SFMono-Regular,
92
- Consolas,
93
- 'Liberation Mono',
94
- Menlo,
95
- monospace;
99
+ ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
96
100
  /* 1 */
97
101
  font-size: 1em;
98
102
  /* 2 */
@@ -156,4 +160,4 @@ textarea:not([rows]) {
156
160
  /* Anything that has been anchored to should have extra scroll margin */
157
161
  :target {
158
162
  scroll-margin-block: 5ex;
159
- }
163
+ }
package/src/_sizes.scss CHANGED
@@ -203,237 +203,239 @@
203
203
  }
204
204
  }
205
205
 
206
- @each $size, $value in config.$base-sizes {
207
- @include padding-classes($size, $value);
208
- @include margin-classes($size, $value);
209
- @include width-classes($size, $value);
210
- @include height-classes($size, $value);
211
- @include size-classes($size, $value);
212
- }
206
+ @layer utilities {
207
+ @each $size, $value in config.$base-sizes {
208
+ @include padding-classes($size, $value);
209
+ @include margin-classes($size, $value);
210
+ @include width-classes($size, $value);
211
+ @include height-classes($size, $value);
212
+ @include size-classes($size, $value);
213
+ }
213
214
 
214
- //extended sizes
215
- $size: 10;
215
+ //extended sizes
216
+ $size: 10;
216
217
 
217
- @while $size <=config.$highest-multiplier {
218
- @include padding-classes($size, config.$base-size * $size);
219
- @include margin-classes($size, config.$base-size * $size);
220
- @include width-classes($size, config.$base-size * $size);
221
- @include height-classes($size, config.$base-size * $size);
222
- @include size-classes($size, config.$base-size * $size);
223
- $size: $size + 1;
224
- }
218
+ @while $size <=config.$highest-multiplier {
219
+ @include padding-classes($size, config.$base-size * $size);
220
+ @include margin-classes($size, config.$base-size * $size);
221
+ @include width-classes($size, config.$base-size * $size);
222
+ @include height-classes($size, config.$base-size * $size);
223
+ @include size-classes($size, config.$base-size * $size);
224
+ $size: $size + 1;
225
+ }
225
226
 
226
- .m-auto {
227
- margin: auto;
228
- }
227
+ .m-auto {
228
+ margin: auto;
229
+ }
229
230
 
230
- .mx-auto {
231
- margin-left: auto;
232
- margin-right: auto;
233
- }
231
+ .mx-auto {
232
+ margin-left: auto;
233
+ margin-right: auto;
234
+ }
234
235
 
235
- .my-auto {
236
- margin-top: auto;
237
- margin-bottom: auto;
238
- }
236
+ .my-auto {
237
+ margin-top: auto;
238
+ margin-bottom: auto;
239
+ }
239
240
 
240
- .mt-auto {
241
- margin-top: auto;
242
- }
241
+ .mt-auto {
242
+ margin-top: auto;
243
+ }
243
244
 
244
- .mb-auto {
245
- margin-bottom: auto;
246
- }
245
+ .mb-auto {
246
+ margin-bottom: auto;
247
+ }
247
248
 
248
- .ml-auto {
249
- margin-left: auto;
250
- }
249
+ .ml-auto {
250
+ margin-left: auto;
251
+ }
251
252
 
252
- .mr-auto {
253
- margin-right: auto;
254
- }
253
+ .mr-auto {
254
+ margin-right: auto;
255
+ }
255
256
 
256
- .w-auto {
257
- width: auto;
258
- }
257
+ .w-auto {
258
+ width: auto;
259
+ }
259
260
 
260
- // Fractional widths and heights
261
- @each $columns in config.$layout-divisions {
262
- @for $span from 1 through ($columns - 1) {
263
- $size: math.percentage(math.div($span, $columns));
261
+ // Fractional widths and heights
262
+ @each $columns in config.$layout-divisions {
263
+ @for $span from 1 through ($columns - 1) {
264
+ $size: math.percentage(math.div($span, $columns));
264
265
 
265
- .w-#{$span}\/#{$columns} {
266
- width: $size;
267
- }
266
+ .w-#{$span}\/#{$columns} {
267
+ width: $size;
268
+ }
268
269
 
269
- .h-#{$span}\/#{$columns} {
270
- height: $size;
270
+ .h-#{$span}\/#{$columns} {
271
+ height: $size;
272
+ }
271
273
  }
272
274
  }
273
- }
274
275
 
275
- .w-full {
276
- width: 100%;
277
- }
276
+ .w-full {
277
+ width: 100%;
278
+ }
278
279
 
279
- .w-screen {
280
- width: 100vw;
281
- }
280
+ .w-screen {
281
+ width: 100vw;
282
+ }
282
283
 
283
- .w-svw {
284
- width: 100svw;
285
- }
284
+ .w-svw {
285
+ width: 100svw;
286
+ }
286
287
 
287
- .w-lvw {
288
- width: 100lvw;
289
- }
288
+ .w-lvw {
289
+ width: 100lvw;
290
+ }
290
291
 
291
- .w-dvw {
292
- width: 100dvw;
293
- }
292
+ .w-dvw {
293
+ width: 100dvw;
294
+ }
294
295
 
295
- .w-min {
296
- width: min-content;
297
- }
296
+ .w-min {
297
+ width: min-content;
298
+ }
298
299
 
299
- .w-max {
300
- width: max-content;
301
- }
300
+ .w-max {
301
+ width: max-content;
302
+ }
302
303
 
303
- .w-fit {
304
- width: fit-content;
305
- }
304
+ .w-fit {
305
+ width: fit-content;
306
+ }
306
307
 
307
- .h-full {
308
- height: 100%;
309
- }
308
+ .h-full {
309
+ height: 100%;
310
+ }
310
311
 
311
- .h-screen {
312
- height: 100vh;
313
- }
312
+ .h-screen {
313
+ height: 100vh;
314
+ }
314
315
 
315
- .h-svh {
316
- height: 100svh;
317
- }
316
+ .h-svh {
317
+ height: 100svh;
318
+ }
318
319
 
319
- .h-lvh {
320
- height: 100lvh;
321
- }
320
+ .h-lvh {
321
+ height: 100lvh;
322
+ }
322
323
 
323
- .h-dvh {
324
- height: 100dvh;
325
- }
324
+ .h-dvh {
325
+ height: 100dvh;
326
+ }
326
327
 
327
- .h-min {
328
- height: min-content;
329
- }
328
+ .h-min {
329
+ height: min-content;
330
+ }
330
331
 
331
- .h-max {
332
- height: max-content;
333
- }
332
+ .h-max {
333
+ height: max-content;
334
+ }
334
335
 
335
- .h-fit {
336
- height: fit-content;
337
- }
336
+ .h-fit {
337
+ height: fit-content;
338
+ }
338
339
 
339
- .h-auto {
340
- height: auto;
341
- }
340
+ .h-auto {
341
+ height: auto;
342
+ }
342
343
 
343
- // Min/max widths
344
- .min-w-full {
345
- min-width: 100%;
346
- }
344
+ // Min/max widths
345
+ .min-w-full {
346
+ min-width: 100%;
347
+ }
347
348
 
348
- .min-w-screen {
349
- min-width: 100vw;
350
- }
349
+ .min-w-screen {
350
+ min-width: 100vw;
351
+ }
351
352
 
352
- .min-w-min {
353
- min-width: min-content;
354
- }
353
+ .min-w-min {
354
+ min-width: min-content;
355
+ }
355
356
 
356
- .min-w-max {
357
- min-width: max-content;
358
- }
357
+ .min-w-max {
358
+ min-width: max-content;
359
+ }
359
360
 
360
- .min-w-fit {
361
- min-width: fit-content;
362
- }
361
+ .min-w-fit {
362
+ min-width: fit-content;
363
+ }
363
364
 
364
- .max-w-full {
365
- max-width: 100%;
366
- }
365
+ .max-w-full {
366
+ max-width: 100%;
367
+ }
367
368
 
368
- .max-w-screen {
369
- max-width: 100vw;
370
- }
369
+ .max-w-screen {
370
+ max-width: 100vw;
371
+ }
371
372
 
372
- .max-w-none {
373
- max-width: none;
374
- }
373
+ .max-w-none {
374
+ max-width: none;
375
+ }
375
376
 
376
- .max-w-min {
377
- max-width: min-content;
378
- }
377
+ .max-w-min {
378
+ max-width: min-content;
379
+ }
379
380
 
380
- .max-w-max {
381
- max-width: max-content;
382
- }
381
+ .max-w-max {
382
+ max-width: max-content;
383
+ }
383
384
 
384
- .max-w-fit {
385
- max-width: fit-content;
386
- }
385
+ .max-w-fit {
386
+ max-width: fit-content;
387
+ }
387
388
 
388
- // Min/max heights
389
- .min-h-full {
390
- min-height: 100%;
391
- }
389
+ // Min/max heights
390
+ .min-h-full {
391
+ min-height: 100%;
392
+ }
392
393
 
393
- .min-h-screen {
394
- min-height: 100vh;
395
- }
394
+ .min-h-screen {
395
+ min-height: 100vh;
396
+ }
396
397
 
397
- .min-h-svh {
398
- min-height: 100svh;
399
- }
398
+ .min-h-svh {
399
+ min-height: 100svh;
400
+ }
400
401
 
401
- .min-h-dvh {
402
- min-height: 100dvh;
403
- }
402
+ .min-h-dvh {
403
+ min-height: 100dvh;
404
+ }
404
405
 
405
- .min-h-0 {
406
- min-height: 0;
407
- }
406
+ .min-h-0 {
407
+ min-height: 0;
408
+ }
408
409
 
409
- .max-h-full {
410
- max-height: 100%;
411
- }
410
+ .max-h-full {
411
+ max-height: 100%;
412
+ }
412
413
 
413
- .max-h-screen {
414
- max-height: 100vh;
415
- }
414
+ .max-h-screen {
415
+ max-height: 100vh;
416
+ }
416
417
 
417
- .max-h-svh {
418
- max-height: 100svh;
419
- }
418
+ .max-h-svh {
419
+ max-height: 100svh;
420
+ }
420
421
 
421
- .max-h-dvh {
422
- max-height: 100dvh;
423
- }
422
+ .max-h-dvh {
423
+ max-height: 100dvh;
424
+ }
424
425
 
425
- .max-h-none {
426
- max-height: none;
427
- }
426
+ .max-h-none {
427
+ max-height: none;
428
+ }
428
429
 
429
- .size-full {
430
- width: 100%;
431
- height: 100%;
432
- }
430
+ .size-full {
431
+ width: 100%;
432
+ height: 100%;
433
+ }
433
434
 
434
- .size-auto {
435
- width: auto;
436
- height: auto;
435
+ .size-auto {
436
+ width: auto;
437
+ height: auto;
438
+ }
437
439
  }
438
440
 
439
441
  @mixin gap-classes($size-name, $value) {
@@ -456,13 +458,15 @@ $size: 10;
456
458
  }
457
459
  }
458
460
 
459
- @each $size, $value in config.$base-sizes {
460
- @include gap-classes($size, $value);
461
- }
461
+ @layer utilities {
462
+ @each $size, $value in config.$base-sizes {
463
+ @include gap-classes($size, $value);
464
+ }
462
465
 
463
- $gap-size: 10;
466
+ $gap-size: 10;
464
467
 
465
- @while $gap-size <=config.$highest-multiplier {
466
- @include gap-classes($gap-size, config.$base-size * $gap-size);
467
- $gap-size: $gap-size + 1;
468
+ @while $gap-size <=config.$highest-multiplier {
469
+ @include gap-classes($gap-size, config.$base-size * $gap-size);
470
+ $gap-size: $gap-size + 1;
471
+ }
468
472
  }
@@ -29,55 +29,57 @@ body {
29
29
  font-family: config.$font-family;
30
30
  }
31
31
 
32
- h1,
33
- h2,
34
- h3,
35
- h4,
36
- h5,
37
- h6,
38
- p,
39
- a,
40
- span,
41
- li,
42
- button,
43
- label,
44
- td,
45
- th,
46
- blockquote,
47
- figcaption,
48
- caption,
49
- small,
50
- code {
51
- //weights
52
- @each $name, $value in config.$font-weights {
53
- $escaped: utility.str-replace($name, ".", "\\.");
32
+ @layer utilities {
33
+ h1,
34
+ h2,
35
+ h3,
36
+ h4,
37
+ h5,
38
+ h6,
39
+ p,
40
+ a,
41
+ span,
42
+ li,
43
+ button,
44
+ label,
45
+ td,
46
+ th,
47
+ blockquote,
48
+ figcaption,
49
+ caption,
50
+ small,
51
+ code {
52
+ //weights
53
+ @each $name, $value in config.$font-weights {
54
+ $escaped: utility.str-replace($name, ".", "\\.");
54
55
 
55
- .#{$escaped} {
56
- font-weight: $value;
56
+ .#{$escaped} {
57
+ font-weight: $value;
58
+ }
57
59
  }
58
- }
59
60
 
60
- //style
61
- .italic {
62
- font-style: italic;
63
- }
61
+ //style
62
+ .italic {
63
+ font-style: italic;
64
+ }
64
65
 
65
- .not-italic {
66
- font-style: normal;
66
+ .not-italic {
67
+ font-style: normal;
68
+ }
67
69
  }
68
- }
69
70
 
70
- // Font sizes
71
- @each $size, $value in config.$font-sizes {
72
- .text-#{$size} {
73
- font-size: utility.px-to-rem(list.nth($value, 1));
74
- line-height: list.nth($value, 2);
71
+ // Font sizes
72
+ @each $size, $value in config.$font-sizes {
73
+ .text-#{$size} {
74
+ font-size: utility.px-to-rem(list.nth($value, 1));
75
+ line-height: list.nth($value, 2);
76
+ }
75
77
  }
76
- }
77
78
 
78
- //TW weights
79
- @each $name, $value in config.$font-weights {
80
- .font-#{$name} {
81
- font-weight: $value;
79
+ //TW weights
80
+ @each $name, $value in config.$font-weights {
81
+ .font-#{$name} {
82
+ font-weight: $value;
83
+ }
82
84
  }
83
85
  }