@mlut/core 1.0.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.
Files changed (84) hide show
  1. package/README.md +24 -0
  2. package/_index.scss +1 -0
  3. package/_tools.scss +1 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +2 -0
  6. package/dist/jit/JitEngine.d.ts +19 -0
  7. package/dist/jit/JitEngine.js +124 -0
  8. package/dist/jit/index.d.ts +1 -0
  9. package/dist/jit/index.js +1 -0
  10. package/dist/sass/addons/demo-theme.scss +112 -0
  11. package/dist/sass/css/_base-setup.scss +3 -0
  12. package/dist/sass/css/_index.scss +2 -0
  13. package/dist/sass/css/helpers/_index.scss +3 -0
  14. package/dist/sass/css/helpers/btn.scss +28 -0
  15. package/dist/sass/css/helpers/gs-debug.scss +28 -0
  16. package/dist/sass/css/helpers/ratio-box.scss +47 -0
  17. package/dist/sass/css/helpers/row.scss +98 -0
  18. package/dist/sass/css/helpers/wrapper.scss +21 -0
  19. package/dist/sass/css/styles/_index.scss +2 -0
  20. package/dist/sass/css/styles/generic.scss +296 -0
  21. package/dist/sass/css/styles/variables.scss +32 -0
  22. package/dist/sass/css/utils/_bg-bd.scss +27 -0
  23. package/dist/sass/css/utils/_grid.scss +37 -0
  24. package/dist/sass/css/utils/_index.scss +2 -0
  25. package/dist/sass/css/utils/_load.scss +9 -0
  26. package/dist/sass/css/utils/_transition.scss +16 -0
  27. package/dist/sass/css/utils/box-alignment.scss +29 -0
  28. package/dist/sass/css/utils/box-model.scss +48 -0
  29. package/dist/sass/css/utils/grid-system.scss +17 -0
  30. package/dist/sass/css/utils/init.scss +107 -0
  31. package/dist/sass/css/utils/other.scss +35 -0
  32. package/dist/sass/css/utils/text.scss +33 -0
  33. package/dist/sass/css/utils/visual.scss +32 -0
  34. package/dist/sass/index.scss +4 -0
  35. package/dist/sass/tools/_index.scss +4 -0
  36. package/dist/sass/tools/functions/_index.import.scss +3 -0
  37. package/dist/sass/tools/functions/_index.scss +9 -0
  38. package/dist/sass/tools/functions/base/_error.scss +9 -0
  39. package/dist/sass/tools/functions/base/_getters.scss +124 -0
  40. package/dist/sass/tools/functions/base/_index.scss +11 -0
  41. package/dist/sass/tools/functions/base/_list.scss +56 -0
  42. package/dist/sass/tools/functions/base/_math.scss +149 -0
  43. package/dist/sass/tools/functions/base/_string.scss +300 -0
  44. package/dist/sass/tools/functions/common/_custom-units.scss +231 -0
  45. package/dist/sass/tools/functions/common/_forward-tools.scss +2 -0
  46. package/dist/sass/tools/functions/common/_helpers.scss +57 -0
  47. package/dist/sass/tools/functions/common/_index.scss +9 -0
  48. package/dist/sass/tools/functions/common/_utils.scss +211 -0
  49. package/dist/sass/tools/functions/high/_at-rules.scss +296 -0
  50. package/dist/sass/tools/functions/high/_forward-tools.scss +3 -0
  51. package/dist/sass/tools/functions/high/_index.scss +8 -0
  52. package/dist/sass/tools/functions/high/utils/_index.scss +288 -0
  53. package/dist/sass/tools/functions/high/utils/_parse-util.scss +107 -0
  54. package/dist/sass/tools/functions/high/utils/_range-generators.scss +355 -0
  55. package/dist/sass/tools/functions/high/utils/_util-apply-selector.scss +134 -0
  56. package/dist/sass/tools/functions/high/utils/_value-converters.scss +294 -0
  57. package/dist/sass/tools/functions/high/utils/_value-transformers.scss +65 -0
  58. package/dist/sass/tools/mixins/_index.import.scss +2 -0
  59. package/dist/sass/tools/mixins/_index.scss +8 -0
  60. package/dist/sass/tools/mixins/base/_forward-tools.scss +2 -0
  61. package/dist/sass/tools/mixins/base/_index.scss +93 -0
  62. package/dist/sass/tools/mixins/base/_mk-ar.scss +96 -0
  63. package/dist/sass/tools/mixins/base/_mk-state.scss +175 -0
  64. package/dist/sass/tools/mixins/high/_forward-tools.scss +3 -0
  65. package/dist/sass/tools/mixins/high/_index.scss +1 -0
  66. package/dist/sass/tools/mixins/high/utils/_index.scss +188 -0
  67. package/dist/sass/tools/mixins/high/utils/_mk-util.scss +366 -0
  68. package/dist/sass/tools/settings/_index.import.scss +3 -0
  69. package/dist/sass/tools/settings/_index.scss +3 -0
  70. package/dist/sass/tools/settings/base/_general.scss +175 -0
  71. package/dist/sass/tools/settings/base/_index.scss +2 -0
  72. package/dist/sass/tools/settings/base/_utils.scss +578 -0
  73. package/dist/sass/tools/settings/common/_at-rules.scss +213 -0
  74. package/dist/sass/tools/settings/common/_index.scss +2 -0
  75. package/dist/sass/tools/settings/common/_utils.scss +1926 -0
  76. package/dist/sass/tools/settings/high/_forward-tools.scss +2 -0
  77. package/dist/sass/tools/settings/high/_grid.scss +55 -0
  78. package/dist/sass/tools/settings/high/_index.scss +2 -0
  79. package/dist/sass/tools/settings/high/_utils.scss +104 -0
  80. package/dist/utils/index.d.ts +1 -0
  81. package/dist/utils/index.js +1 -0
  82. package/dist/utils/logger.d.ts +7 -0
  83. package/dist/utils/logger.js +13 -0
  84. package/package.json +48 -0
@@ -0,0 +1,578 @@
1
+ @use 'sass:map';
2
+ @use 'sass:list';
3
+
4
+ // Utilities
5
+ //
6
+ // In the settings of utilities, there are both data and configs.
7
+ //
8
+ // Styleguide: settings.utils
9
+
10
+ // Other
11
+ //
12
+ // Other settings that are not contained in main large maps
13
+ //
14
+ // Styleguide: settings.utils.other
15
+
16
+ // $utils-up-specificity
17
+ //
18
+ // `boolean | string`<br>Increase the specificity of all utilities at once. When `true` - to each utility property will be added `!important`. A string with a CSS selector is also acceptable. It will be added before the utility selector. <br>Defaults to: `false`
19
+ //
20
+ // ```scss
21
+ // @use 'mlut/tools' as ml with (
22
+ // $utils-up-specificity: true,
23
+ // );
24
+ //
25
+ // @include ml.apply('Mt2r');
26
+ //
27
+ // // CSS
28
+ // .Mt2r {
29
+ // margin-top: 2rem !important;
30
+ // }
31
+ // ```
32
+ //
33
+ // Styleguide: settings.utils.other.up_specificity
34
+
35
+ // Utils groups
36
+ //
37
+ // Groups are stored in a separate database `$utils-groups-db`. To modify or add groups, use `$utils-groups`. When specifying utilities in the group, you can use Generation Syntax. In this case, utilities with components will be generated for each value.
38
+ //
39
+ // ```scss
40
+ // @use 'mlut' as ml with (
41
+ // $utils-groups: (
42
+ // 'MPSpaces': (
43
+ // 'M_ frc', Mt, Mr, Mb, Ml, -Mx, -My,
44
+ // P, Pt, Pr, Pb, Pl, -Px, -Py,
45
+ // ),
46
+ // ),
47
+ // $utils: (
48
+ // 'MPSpaces': (
49
+ // 100, '$myOffset'
50
+ // ),
51
+ // ),
52
+ // );
53
+ //
54
+ // // CSS
55
+ // // some utils from standard library before
56
+ //
57
+ // .M100 {
58
+ // margin: 100px;
59
+ // }
60
+ //
61
+ // .M100_frc:first-child {
62
+ // margin: 100px;
63
+ // }
64
+ //
65
+ // .M-\$myOffset {
66
+ // margin: var(--ml-myOffset);
67
+ // }
68
+ //
69
+ // .M-\$myOffset_frc:first-child {
70
+ // margin: var(--ml-myOffset);
71
+ // }
72
+ //
73
+ // .Mt100 {
74
+ // margin-top: 100px;
75
+ // }
76
+ //
77
+ // // etc
78
+ // ```
79
+ //
80
+ // Styleguide: settings.utils.other.groups
81
+
82
+ // Config
83
+ //
84
+ // Most of the settings are stored here, on the basis of which utilities work. Below are some sections that may be useful during customization.
85
+ //
86
+ // Styleguide: settings.utils.config
87
+
88
+ // States
89
+ //
90
+ // States are stored in the `states` section and grouped by type:
91
+ // - `pseudo-cls` - pseudo classes
92
+ // - `pseudo-elm` - pseudo elements
93
+ // - `custom` - all the rest
94
+ //
95
+ // Below is a quick reference of states. Later it will be supplemented by comments and examples.
96
+ //
97
+ // If you want to add a state, it is recommended to do this in the `custom` section. *Please note* that in the code, all custom states begin with a hyphen. This prevents names collision with native states from CSS.
98
+ // ```scss
99
+ // @use 'mlut/tools' as ml with (
100
+ // $utils-config: (
101
+ // 'states': (
102
+ // 'custom': (
103
+ // 'rtl': '[dir=“rtl”]',
104
+ // ),
105
+ // ),
106
+ // ),
107
+ // );
108
+ //
109
+ // @include ml.apply(('-rtl _Mr2r'), (), true);
110
+ //
111
+ // // CSS
112
+ // [dir=“rtl”] .-rtl_Mr2r {
113
+ // margin-right: 2rem;
114
+ // }
115
+ // ```
116
+ //
117
+ // Styleguide: settings.utils.config.states
118
+
119
+ // Conversion type
120
+ //
121
+ // Available on the key `conversion-types`. This is a map, the keys in which are names of types that are used in utility options. The values in a map are a list of converters through which the value of utilities passes.
122
+ // ```scss
123
+ // $utils-cfg: (
124
+ // 'conversion-types': (
125
+ // 'angle': ('angle', 'global-kw', 'cust-prop'),
126
+ // 'grid-span': ('grid-span', 'num-length', 'global-kw', 'cust-prop'),
127
+ // ),
128
+ // );
129
+ // ```
130
+ // Each converter is a function that returns, either an converted or initial value. By default, if the value was converted, then the process stops, else the value passes to the next converter from the list. If not a single converter has no worked, then at the result we get the initial value. But this behavior can be changed when adding a keyword `Pl`(pipeline) to the list. The converters specified after it will be applied regardless of whether the value was converted in one of them. The list of all converters can be viewed in the code, but later they will be added here
131
+ //
132
+ // Below you can find all available types of conversion. In the description of each type there will be a schema: a list of converters and keywords on which the conversion depends. For DRY reason, in the schema used Sass variables containing frequently used converters. They will be presented in the documentation as meta-types. You can use these variables when adding new types of conversion. In addition, the description of the type will have examples of its work.
133
+ //
134
+ // Styleguide: settings.utils.config.conversion
135
+
136
+ // $uv-type-base
137
+ //
138
+ // The basic meta type on which all other types are based. Schema:
139
+ // ```scss
140
+ // $uv-type-base: ('global-kw', 'cust-prop');
141
+ // ```
142
+ // Usage:
143
+ // ```scss
144
+ // // global keywords
145
+ // @debug ml.uv('C-ih'); // inherit
146
+ // @debug ml.uv('W-gSm'); // 520px - sm breakpoints
147
+ //
148
+ // // custom properties
149
+ // @debug ml.uv('W-$myCard?200'); // var(--ml-myCard, 200px)
150
+ // ```
151
+ //
152
+ // Styleguide: settings.utils.config.conversion.meta_base
153
+
154
+ // $uv-type-default
155
+ //
156
+ // Meta type that corresponds to the default conversion type. If the type of conversion is not specified for the utility, then this will be used. Schema:
157
+ // ```scss
158
+ // $uv-type-default: list.join(('keyword', 'number'), $uv-type-base);
159
+ //
160
+ // // and below in the conversion types
161
+ // 'conversion-types': (
162
+ // 'default': $uv-type-default,
163
+ // ```
164
+ // Usage:
165
+ // ```scss
166
+ // // keyword
167
+ // @debug ml.uv('Ai-c'); // center
168
+ // @debug ml.uv('Bd'); // 1px solid
169
+ //
170
+ // // number
171
+ // @debug ml.uv('W200'); // 200px
172
+ // @debug ml.uv('Ml-0.7'); // -0.7rem
173
+ // @debug ml.uv('P1r;2e;5p'); // 1rem 2em 5%
174
+ // @debug ml.uv('Ml-2.5gg'); // calc(var(--ml-gg) * -2.5)
175
+ // @debug ml.uv('W1/3'); // 33.3333333333%
176
+ // @debug ml.uv('W2/$div'); // calc(2 / var(--ml-div) * 100%)
177
+ // ```
178
+ //
179
+ // Styleguide: settings.utils.config.conversion.meta_default
180
+
181
+ // num-length
182
+ //
183
+ // This type converts numbers almost as a default type, except that it does not convert numbers without units of measurement in a pixels. Schema:
184
+ // ```scss
185
+ // ('num-length': list.join('num-length', $uv-type-base))
186
+ // ```
187
+ // Usage:
188
+ // ```scss
189
+ // @debug ml.uv('Zi5'); // 5
190
+ // @debug ml.uv('Tas2e'); // 2em
191
+ // ```
192
+ //
193
+ // Styleguide: settings.utils.config.conversion.num-length
194
+
195
+ // kw-num-length
196
+ //
197
+ // Type works almost as a default type, with the exception of that it does not convert numbers without units of measurement in a pixels. Schema:
198
+ // ```scss
199
+ // ('kw-num-length': list.set-nth($uv-type-default, 2, 'num-length'))
200
+ // ```
201
+ // Usage:
202
+ // ```scss
203
+ // @debug ml.uv('Fnw300'); // 300
204
+ // @debug ml.uv('Fnw-bd'); // bolder
205
+ // @debug ml.uv('Lnh4.5u'); // 1.125rem
206
+ // ```
207
+ //
208
+ // Styleguide: settings.utils.config.conversion.kw-num-length
209
+
210
+ // num-percent
211
+ //
212
+ // Converts percent to decimal fractions. Schema:
213
+ // ```scss
214
+ // ('num-percent': list.join('num-percent', $uv-type-base))
215
+ // ```
216
+ // Usage:
217
+ // ```scss
218
+ // @debug ml.uv('O70p'); // 0.7
219
+ // @debug ml.uv('-S-50p'); // -0.5
220
+ // ```
221
+ //
222
+ // Styleguide: settings.utils.config.conversion.num-percent
223
+
224
+ // angle
225
+ //
226
+ // Converts angles. Schema:
227
+ // ```scss
228
+ // ('angle': list.join('angle', $uv-type-base))
229
+ // ```
230
+ // Usage:
231
+ // ```scss
232
+ // @debug ml.uv('-Rt45d'); // 45deg
233
+ // @debug ml.uv('-Rt-50g'); // -50grad
234
+ // @debug ml.uv('-Sk3.14r;2r'); // 3.14rad 2rad
235
+ // @debug ml.uv('-Hur-1.5t'); // -1.5turn
236
+ // ```
237
+ //
238
+ // Styleguide: settings.utils.config.conversion.angle
239
+
240
+ // color
241
+ //
242
+ // Converts colors. Schema:
243
+ // ```scss
244
+ // ('color': list.join('color', $uv-type-base))
245
+ // ```
246
+ // Usage:
247
+ // ```scss
248
+ // @debug ml.uv('C-tp'); // transparent
249
+ // @debug ml.uv('Bgc#c06*$bgAlpha'); // rgba(204, 0, 102, var(--ml-bgAlpha, 1))
250
+ //
251
+ // // you can use custom color keyword that you added in the database
252
+ // @debug ml.uv('Bgc-purple50*20p'); // rgba(102, 0, 204, 0.2)
253
+ // ```
254
+ //
255
+ // Styleguide: settings.utils.config.conversion.color
256
+
257
+ // abbr-kw
258
+ //
259
+ // Expand abbreaviations of utilities. Schema:
260
+ // ```scss
261
+ // ('abbr-kw': list.join('abbr', $uv-type-default))
262
+ // ```
263
+ // Usage:
264
+ // ```scss
265
+ // @debug ml.uv('Wlc-tf'); // transform
266
+ // @debug ml.uv('Ts-bdc;2s,c;1s'); // border-color 2s, color 1s
267
+ // ```
268
+ //
269
+ // Styleguide: settings.utils.config.conversion.abbr-kw
270
+
271
+ // grid-tpl
272
+ //
273
+ // Adds converting of special keywords for grid templates to the default type. Schema:
274
+ // ```scss
275
+ // ('grid-tpl': list.join('grid-tracks', $uv-type-default))
276
+ // ```
277
+ // Usage:
278
+ // ```scss
279
+ // @debug ml.uv('Gtc-t4'); // repeat(4, minmax(0, 1fr))
280
+ // @debug ml.uv('G-t3/af;d;15r'); // repeat(3, minmax(0, 1fr)) / auto-flow dense 15rem
281
+ // ```
282
+ //
283
+ // Styleguide: settings.utils.config.conversion.grid-tpl
284
+
285
+ // grid-span
286
+ //
287
+ // Converts special keywords, to specify the sizes of the grid items in spans. Schema:
288
+ // ```scss
289
+ // ('grid-span': list.join(('grid-span', 'num-length'), $uv-type-base))
290
+ // ```
291
+ // Usage:
292
+ // ```scss
293
+ // @debug ml.uv('Gc-s3'); // span 3 / span 3
294
+ // ```
295
+ //
296
+ // Styleguide: settings.utils.config.conversion.grid-span
297
+
298
+ // outline
299
+ //
300
+ // Adds colors conversion to a default converters chain. Schema:
301
+ // ```scss
302
+ // ('outline': list.join(
303
+ // ('keyword', 'color', 'number'), $uv-type-base
304
+ // ))
305
+ // ```
306
+ // Usage:
307
+ // ```scss
308
+ // @debug ml.uv('Bd3;tp;d'); // 3px transparent dotted
309
+ // ```
310
+ //
311
+ // Styleguide: settings.utils.config.conversion.outline
312
+
313
+ // gradient
314
+ //
315
+ // Converts values in the gradient functions. Schema:
316
+ // ```scss
317
+ // ('gradient': (
318
+ // 'keyword', 'color', 'cust-prop', 'Pl', 'number', 'angle', 'global-kw'
319
+ // ))
320
+ // ```
321
+ // Usage:
322
+ // ```scss
323
+ // @debug ml.uv('-Gdrl-b;r,black,#ff0'); // repeating-linear-gradient(to bottom right, black, #ff0)
324
+ // @debug ml.uv('-Gdl-50d,blue;3r,cc;80p'); // linear-gradient(50deg, blue 3rem, currentColor 80%)
325
+ // ```
326
+ //
327
+ // Styleguide: settings.utils.config.conversion.gradient
328
+
329
+ $cCtx: '-Ctx' !default;
330
+ $kSsVCP: 'Pl' !default; // pipeline
331
+ $kSsUMCS: 'core' !default;
332
+ $uv-type-base: ('global-kw', 'cust-prop',) !default;
333
+ $uv-type-default: list.join(('keyword', 'number'), $uv-type-base);
334
+ $uv-kw-alias-behavior: 0 !default;
335
+ $utils-up-specificity: false !default;
336
+ $utils-config: () !default;
337
+ $utils-config-ext: () !default;
338
+ $jit: () !default;
339
+
340
+ //stylelint-disable
341
+ $utils-cfg: (
342
+ 'gg-fallback-list': (
343
+ T, R, B, L, -X, -Y, -I,
344
+ P, Pt, Pr, Pb, Pl, -Px, -Py,
345
+ M, Mt, Mr, Mb, Ml, -Mx, -My,
346
+ Bdw, Bdtw, Bdrw, Bdbw, Bdlw, -Bdxw, -Bdyw,
347
+ Bd, Bdt, Bdr, Bdb, Bdl, -Bdx, -Bdy,
348
+ Mxw, Mnw, Mxh, Mnh,
349
+ Fns, -Fns, Txi, Lnh, Lts, Txs, Va, Txd, Fn,
350
+ Bxsd, Bdrd, Bgs, Bgp, Ol, Olw, Olo,
351
+ Stw, Fl, Flb, Tfo, -Gdl, -Gdrl,
352
+ ),
353
+
354
+ 'conversion-types': (
355
+ 'default': $uv-type-default,
356
+ 'num-length': list.join('num-length', $uv-type-base),
357
+ 'kw-num-length': list.set-nth($uv-type-default, 2, 'num-length'),
358
+ 'num-percent': list.join('num-percent', $uv-type-base),
359
+ 'angle': list.join('angle', $uv-type-base),
360
+ 'color': list.join('color', $uv-type-base),
361
+ 'abbr-kw': list.join('abbr', $uv-type-default),
362
+ 'grid-tpl': list.join('grid-tracks', $uv-type-default),
363
+ 'grid-span': list.join(('grid-span', 'num-length'), $uv-type-base),
364
+ 'resolution': list.set-nth($uv-type-default, 2, 'resolution'),
365
+ 'outline': list.join(
366
+ ('keyword', 'color', 'number'), $uv-type-base
367
+ ),
368
+ 'gradient': (
369
+ 'keyword', 'color', 'cust-prop', $kSsVCP, 'number', 'angle', 'global-kw'
370
+ )
371
+ ),
372
+
373
+ 'abbr-separators': (),
374
+
375
+ 'converters': (),
376
+
377
+ 'transformers': (),
378
+
379
+ 'range-generators': (),
380
+
381
+ 'units': (
382
+ 'default': (
383
+ '': 1px,
384
+ 'e': 1em,
385
+ 'p': 1%,
386
+ 'r': 1rem,
387
+ ),
388
+ 'num-length': (
389
+ 'e': 1em,
390
+ 'p': 1%,
391
+ 'r': 1rem,
392
+ ),
393
+ 'resolution': (
394
+ 'i': 1dpi,
395
+ 'c': 1dpcm,
396
+ 'x': 1dppx,
397
+ ),
398
+ 'num-percent': (
399
+ 'p': 0.01,
400
+ ),
401
+ 'angle': (
402
+ 'd': 1deg,
403
+ 'g': 1grad,
404
+ 'r': 1rad,
405
+ 'ra': 1rad,
406
+ 't': 1turn,
407
+ ),
408
+ ),
409
+
410
+ 'tokens': (
411
+ 'util': (
412
+ 'str-value': '-',
413
+ 'raw-value': '=',
414
+ 'num-value': '',
415
+ 'hash-value': '',
416
+ 'fallback-value': '?',
417
+ 'color-alpha': '*',
418
+ 'space': ';',
419
+ 'custom-property': '$',
420
+ 'global-keyword': 'g',
421
+ 'keyword-chain': '.',
422
+ 'important': '!',
423
+ 'no-list-separator': ' ',
424
+ 'list-separator1': ',',
425
+ 'list-separator2': '/',
426
+ 'component': '_',
427
+ ),
428
+ 'states': (
429
+ 'or': ',',
430
+ 'and': ':',
431
+ 'not': '!',
432
+ 'custom': '-',
433
+ 'this-util': '&',
434
+ 'context': '^',
435
+ 'raw': '=',
436
+ ),
437
+ 'generation': (
438
+ 'states-pseudo-classes': 'StPC',
439
+ 'states-pseudo-elements': 'StPE',
440
+ 'states-only': 'StOl',
441
+ 'states-combine': 'StCb',
442
+ 'uv-keywords-alias': 'KW',
443
+ ),
444
+ ),
445
+
446
+ 'states': (
447
+ 'pseudo-cls': (
448
+ 'a': ':active',
449
+ 'c': ':checked',
450
+ 'd': ':disabled',
451
+ 'df': ':default',
452
+ 'de': ':defined',
453
+ 'e': ':empty',
454
+ 'en': ':enabled',
455
+ 'f': ':focus',
456
+ 'fw': ':focus-within',
457
+ 'fv': ':focus-visible',
458
+ 'frc': ':first-child',
459
+ 'frot': ':first-of-type',
460
+ 'h': ':hover',
461
+ 'i': ':invalid',
462
+ 'id': ':indeterminate',
463
+ 'inr': ':in-range',
464
+ 'lc': ':last-child',
465
+ 'lot': ':last-of-type',
466
+ 'ln': ':link',
467
+ 'oc': ':only-child',
468
+ 'oot': ':only-of-type',
469
+ 'ot': ':optional',
470
+ 'ouor': ':out-of-range',
471
+ 'phs': ':placeholder-shown',
472
+ 'r': ':required',
473
+ 'rt': ':root',
474
+ 'rdo': ':read-only',
475
+ 'rdw': ':read-write',
476
+ 't': ':target',
477
+ 'v': ':visited',
478
+ 'vl': ':valid',
479
+ ),
480
+ 'pseudo-elm': (
481
+ 'af': '::after',
482
+ 'b': '::before',
483
+ 'frl': '::first-line',
484
+ 'frlt': '::first-letter',
485
+ 'flsb': '::file-selector-button',
486
+ 'm': '::marker',
487
+ 'ph': '::placeholder',
488
+ 's': '::selection',
489
+ ),
490
+ 'custom': (
491
+ 'btc': '>*+*', // between children
492
+ 'evc': ':nth-child(2n)', // even child
493
+ 'evot': ':nth-of-type(2n)', // even of type
494
+ 'odc': ':nth-child(odd)', // odd child
495
+ 'odot': ':nth-of-type(odd)',
496
+ 'op': '[open]',
497
+ 'tif': '[tabindex="0"]', // tabindex focus
498
+ 'nojs': '.no-js',
499
+ ),
500
+ ),
501
+ ) !default;
502
+
503
+ $utils-cfg: map.deep-merge($utils-cfg, $utils-config);
504
+ $utils-cfg: map.deep-merge($utils-cfg, $utils-config-ext);
505
+
506
+ $tUSv: map.get($utils-cfg, 'tokens', 'util', 'str-value');
507
+ $tUNv: map.get($utils-cfg, 'tokens', 'util', 'num-value');
508
+ $tURv: map.get($utils-cfg, 'tokens', 'util', 'raw-value');
509
+ $tUHv: map.get($utils-cfg, 'tokens', 'util', 'hash-value');
510
+ $tUFv: map.get($utils-cfg, 'tokens', 'util', 'fallback-value');
511
+ $tUCla: map.get($utils-cfg, 'tokens', 'util', 'color-alpha');
512
+ $tUGkw: map.get($utils-cfg, 'tokens', 'util', 'global-keyword');
513
+ $tUCp: map.get($utils-cfg, 'tokens', 'util', 'custom-property');
514
+ $tUIm: map.get($utils-cfg, 'tokens', 'util', 'important');
515
+ $tUCm: map.get($utils-cfg, 'tokens', 'util', 'component');
516
+ $tUSp: map.get($utils-cfg, 'tokens', 'util', 'space');
517
+ $tUKwc: map.get($utils-cfg, 'tokens', 'util', 'keyword-chain');
518
+ $tUNls: map.get($utils-cfg, 'tokens', 'util', 'no-list-separator');
519
+ $tULs1: map.get($utils-cfg, 'tokens', 'util', 'list-separator1');
520
+ $tULs2: map.get($utils-cfg, 'tokens', 'util', 'list-separator2');
521
+
522
+ $tSOr: map.get($utils-cfg, 'tokens', 'states', 'or');
523
+ $tSAnd: map.get($utils-cfg, 'tokens', 'states', 'and');
524
+ $tSNot: map.get($utils-cfg, 'tokens', 'states', 'not');
525
+ $tSCs: map.get($utils-cfg, 'tokens', 'states', 'custom');
526
+ $tSTu: map.get($utils-cfg, 'tokens', 'states', 'this-util');
527
+ $tSCn: map.get($utils-cfg, 'tokens', 'states', 'context');
528
+ $tSRaw: map.get($utils-cfg, 'tokens', 'states', 'raw');
529
+ $tSTudv: $tSTu + $tUSv;
530
+
531
+ $kUvKA: map.get($utils-cfg, 'tokens', 'generation', 'uv-keywords-alias');
532
+ $kStPC: map.get($utils-cfg, 'tokens', 'generation', 'states-pseudo-classes');
533
+ $kStPE: map.get($utils-cfg, 'tokens', 'generation', 'states-pseudo-elements');
534
+ $kStCb: map.get($utils-cfg, 'tokens', 'generation', 'states-combine');
535
+ $kStOl: map.get($utils-cfg, 'tokens', 'generation', 'states-only');
536
+ $kCfOv: '/override' !default;
537
+ $kCfBan: '/ban' !default;
538
+ $kCfAl: '/allow' !default;
539
+
540
+ $utils-cfg: map.set(
541
+ $utils-cfg,
542
+ 'states',
543
+ 'keywords',
544
+ map.merge(
545
+ (
546
+ $kStPC: 'pseudo-cls',
547
+ $kStPE: 'pseudo-elm',
548
+ $kStCb: null,
549
+ $kStOl: null,
550
+ ),
551
+ map.get($utils-cfg, 'states', 'keywords') or ()
552
+ )
553
+ );
554
+
555
+ $utils-cfg: map.merge(
556
+ $utils-cfg,
557
+ (
558
+ 'tokens-values': (
559
+ $tUNls: space,
560
+ $tULs1: comma,
561
+ $tULs2: slash,
562
+ ),
563
+ 'abbr-separators': list.join(
564
+ (
565
+ $tUSv,
566
+ $tUNv,
567
+ $tURv,
568
+ $tUHv,
569
+ ),
570
+ map.get($utils-cfg, 'abbr-separators') or ()
571
+ )
572
+ )
573
+ );
574
+
575
+ $utils-states: map.merge(
576
+ map.get($utils-cfg, 'states', 'pseudo-cls'),
577
+ map.get($utils-cfg, 'states', 'pseudo-elm'),
578
+ );