@master/css 2.0.0-rc.15 → 2.0.0-rc.16

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 (73) hide show
  1. package/dist/_virtual/_commonjsHelpers.cjs +5 -0
  2. package/dist/_virtual/_commonjsHelpers.mjs +3 -0
  3. package/dist/_virtual/css-escape.cjs +5 -0
  4. package/dist/_virtual/css-escape.mjs +3 -0
  5. package/dist/bin/index.cjs +11 -0
  6. package/dist/bin/index.mjs +9 -0
  7. package/dist/config/animations.cjs +113 -0
  8. package/dist/config/animations.mjs +111 -0
  9. package/dist/config/functions.cjs +352 -0
  10. package/dist/config/functions.mjs +350 -0
  11. package/dist/config/index.cjs +34 -0
  12. package/dist/config/index.mjs +25 -0
  13. package/dist/config/media-queries.cjs +7 -0
  14. package/dist/config/media-queries.mjs +1 -0
  15. package/dist/config/rules.cjs +2190 -0
  16. package/dist/config/rules.mjs +2184 -0
  17. package/dist/config/selectors.cjs +29 -0
  18. package/dist/config/selectors.mjs +27 -0
  19. package/dist/config/semantics.cjs +194 -0
  20. package/dist/config/semantics.mjs +192 -0
  21. package/dist/config/styles.cjs +2 -0
  22. package/dist/config/styles.mjs +1 -0
  23. package/dist/config/variables.cjs +583 -0
  24. package/dist/config/variables.mjs +581 -0
  25. package/dist/constants/base-unit-regex.cjs +5 -0
  26. package/dist/constants/base-unit-regex.mjs +3 -0
  27. package/dist/constants/start-symbol.cjs +10 -0
  28. package/dist/constants/start-symbol.mjs +8 -0
  29. package/dist/core.cjs +979 -0
  30. package/dist/core.d.ts +2 -3
  31. package/dist/core.mjs +974 -0
  32. package/dist/functions/reorder-for-readable-classes.cjs +68 -0
  33. package/dist/functions/reorder-for-readable-classes.d.ts +1 -1
  34. package/dist/functions/reorder-for-readable-classes.mjs +66 -0
  35. package/dist/functions/transform-color-with-opacity.cjs +9 -0
  36. package/dist/functions/transform-color-with-opacity.mjs +7 -0
  37. package/dist/index.cjs +37 -0
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.mjs +13 -0
  40. package/dist/layer.cjs +23 -0
  41. package/dist/layer.mjs +23 -0
  42. package/dist/polyfills/css-escape.cjs +8 -0
  43. package/dist/polyfills/css-escape.mjs +2 -0
  44. package/dist/polyfills/css-escape2.cjs +68 -0
  45. package/dist/polyfills/css-escape2.mjs +64 -0
  46. package/dist/rule.cjs +702 -0
  47. package/dist/rule.d.ts +1 -1
  48. package/dist/rule.mjs +700 -0
  49. package/dist/shared/utils/css-escape.cjs +56 -0
  50. package/dist/shared/utils/css-escape.mjs +54 -0
  51. package/dist/tokens/screen-sizes.cjs +17 -0
  52. package/dist/tokens/screen-sizes.mjs +15 -0
  53. package/dist/utils/concat-arrays.cjs +12 -0
  54. package/dist/utils/concat-arrays.mjs +10 -0
  55. package/dist/utils/extend-config.cjs +59 -0
  56. package/dist/utils/extend-config.mjs +57 -0
  57. package/dist/utils/flatten-object.cjs +15 -0
  58. package/dist/utils/flatten-object.mjs +13 -0
  59. package/dist/utils/get-type.cjs +12 -0
  60. package/dist/utils/get-type.mjs +10 -0
  61. package/dist/utils/hex-to-rgb.cjs +30 -0
  62. package/dist/utils/hex-to-rgb.mjs +28 -0
  63. package/dist/utils/is-plain-object.cjs +15 -0
  64. package/dist/utils/is-plain-object.mjs +13 -0
  65. package/dist/utils/is-symbol.cjs +14 -0
  66. package/dist/utils/is-symbol.mjs +12 -0
  67. package/dist/utils/rgb-to-hex.cjs +7 -0
  68. package/dist/utils/rgb-to-hex.mjs +5 -0
  69. package/package.json +1 -1
  70. package/dist/bin/index.bundle.js +0 -1
  71. package/dist/index.bundle.js +0 -1
  72. package/dist/index.bundle.mjs +0 -1
  73. package/dist/types/global.d.ts +0 -5
@@ -0,0 +1,2184 @@
1
+ import cssEscape from '../shared/utils/css-escape.mjs';
2
+ import { START_SYMBOLS } from '../constants/start-symbol.mjs';
3
+ import { Layer } from '../layer.mjs';
4
+
5
+ const BORDER_STYLES = [
6
+ 'none',
7
+ 'auto',
8
+ 'hidden',
9
+ 'dotted',
10
+ 'dashed',
11
+ 'solid',
12
+ 'double',
13
+ 'groove',
14
+ 'ridge',
15
+ 'inset',
16
+ 'outset'
17
+ ];
18
+ const autofillSolidToValueComponent = function(valueComponents) {
19
+ if (valueComponents.length < 2) return valueComponents;
20
+ const styleValueComponent = valueComponents.find((valueComponent)=>{
21
+ return valueComponent.type === 'string' && BORDER_STYLES.includes(valueComponent.value) || valueComponent.type === 'variable' && BORDER_STYLES.includes(valueComponent.variable?.value);
22
+ });
23
+ if (!styleValueComponent) {
24
+ valueComponents.push({
25
+ type: 'separator',
26
+ value: ' '
27
+ }, {
28
+ type: 'string',
29
+ value: 'solid'
30
+ });
31
+ }
32
+ return valueComponents;
33
+ };
34
+ const rules = {
35
+ group: {
36
+ match: /^(?:.+?[*_>~+])?\{.+?\}/,
37
+ layer: Layer.Core,
38
+ analyze (className) {
39
+ let i = 0;
40
+ for(; i < className.length; i++){
41
+ if (className[i] === '{' && className[i - 1] !== '\\') {
42
+ break;
43
+ }
44
+ }
45
+ return [
46
+ className.slice(i),
47
+ className.slice(0, i)
48
+ ];
49
+ },
50
+ declare (value) {
51
+ const declarations = {};
52
+ const addProp = (propertyName)=>{
53
+ const indexOfColon = propertyName.indexOf(':');
54
+ if (indexOfColon !== -1) {
55
+ const propName = propertyName.slice(0, indexOfColon);
56
+ declarations[propName] = propertyName.slice(indexOfColon + 1);
57
+ }
58
+ };
59
+ const handleRule = (rule)=>{
60
+ const addProps = (cssText)=>{
61
+ const cssProperties = cssText.slice(cssEscape(rule.className).length).match(/\{(.*)\}/)?.[1].split(';');
62
+ if (cssProperties) for (const eachCssProperty of cssProperties){
63
+ addProp(eachCssProperty);
64
+ }
65
+ };
66
+ for (const eachNative of rule.natives){
67
+ addProps(eachNative.text);
68
+ }
69
+ // animation
70
+ if (rule.animationNames) {
71
+ if (!this.animationNames) {
72
+ this.animationNames = [];
73
+ }
74
+ for (const eachKeyframeName of rule.animationNames){
75
+ if (!this.animationNames.includes(eachKeyframeName)) {
76
+ this.animationNames.push(eachKeyframeName);
77
+ }
78
+ }
79
+ }
80
+ // variable
81
+ if (rule.variableNames) {
82
+ if (!this.variableNames) {
83
+ this.variableNames = [];
84
+ }
85
+ for (const eachVariableName of rule.variableNames){
86
+ if (!this.variableNames.includes(eachVariableName)) {
87
+ this.variableNames.push(eachVariableName);
88
+ }
89
+ }
90
+ }
91
+ };
92
+ const names = [];
93
+ let currentName = '';
94
+ const addName = ()=>{
95
+ if (currentName) {
96
+ names.push(currentName.replace(/ /g, '|'));
97
+ currentName = '';
98
+ }
99
+ };
100
+ let i = 1;
101
+ (function analyze(end) {
102
+ for(; i < value.length; i++){
103
+ const char = value[i];
104
+ if (!end) {
105
+ if (char === ';') {
106
+ addName();
107
+ continue;
108
+ }
109
+ if (char === '}') {
110
+ break;
111
+ }
112
+ }
113
+ currentName += char;
114
+ if (end === char) {
115
+ if (end === '\'' || end === '"') {
116
+ let count = 0;
117
+ for(let j = currentName.length - 2;; j--){
118
+ if (currentName[j] !== '\\') {
119
+ break;
120
+ }
121
+ count++;
122
+ }
123
+ if (count % 2) {
124
+ continue;
125
+ }
126
+ }
127
+ break;
128
+ } else if (char in START_SYMBOLS && end !== '\'' && end !== '"') {
129
+ i++;
130
+ analyze(START_SYMBOLS[char]);
131
+ }
132
+ }
133
+ })('');
134
+ addName();
135
+ for (const eachName of names){
136
+ const rules = this.css.generate(eachName);
137
+ if (rules.length) {
138
+ for (const eachRule of rules){
139
+ handleRule(eachRule);
140
+ }
141
+ } else {
142
+ addProp(eachName);
143
+ }
144
+ }
145
+ return declarations;
146
+ }
147
+ },
148
+ variable: {
149
+ match: /^\$[\w-]+:/,
150
+ colored: true,
151
+ layer: Layer.Core,
152
+ declare (value) {
153
+ return {
154
+ ['--' + this.prefix.slice(1, -1)]: value
155
+ };
156
+ }
157
+ },
158
+ 'font-size': {
159
+ match: [
160
+ 'f(?:ont)?'
161
+ ],
162
+ numeric: true,
163
+ unit: 'rem',
164
+ layer: Layer.CoreNative
165
+ },
166
+ 'font-weight': {
167
+ match: [
168
+ 'f(?:ont)?',
169
+ [
170
+ 'bolder'
171
+ ]
172
+ ],
173
+ layer: Layer.CoreNative
174
+ },
175
+ 'font-family': {
176
+ match: [
177
+ 'f(?:ont)?'
178
+ ],
179
+ layer: Layer.CoreNative
180
+ },
181
+ 'font-smoothing': {
182
+ match: [
183
+ 'f(?:ont)?',
184
+ [
185
+ 'antialiased',
186
+ 'subpixel-antialiased'
187
+ ]
188
+ ],
189
+ layer: Layer.CoreNative,
190
+ declare (value) {
191
+ switch(value){
192
+ case 'subpixel-antialiased':
193
+ return {
194
+ '-webkit-font-smoothing': 'auto',
195
+ '-moz-osx-font-smoothing': 'auto'
196
+ };
197
+ case 'antialiased':
198
+ return {
199
+ '-webkit-font-smoothing': 'antialiased',
200
+ '-moz-osx-font-smoothing': 'grayscale'
201
+ };
202
+ }
203
+ }
204
+ },
205
+ 'font-style': {
206
+ match: [
207
+ 'f(?:ont)?',
208
+ [
209
+ 'normal',
210
+ 'italic',
211
+ 'oblique'
212
+ ]
213
+ ],
214
+ layer: Layer.CoreNative,
215
+ unit: 'deg'
216
+ },
217
+ 'font-variant-numeric': {
218
+ match: [
219
+ 'f(?:ont)?',
220
+ [
221
+ 'ordinal',
222
+ 'slashed-zero',
223
+ 'lining-nums',
224
+ 'oldstyle-nums',
225
+ 'proportional-nums',
226
+ 'tabular-nums',
227
+ 'diagonal-fractions',
228
+ 'stacked-fractions'
229
+ ]
230
+ ],
231
+ layer: Layer.CoreNative
232
+ },
233
+ 'font-variant': {
234
+ layer: Layer.CoreNativeShorthand
235
+ },
236
+ 'font-feature-settings': {
237
+ match: /^font-feature:/,
238
+ layer: Layer.CoreNative
239
+ },
240
+ font: {
241
+ match: /^f:/,
242
+ layer: Layer.CoreNativeShorthand,
243
+ variables: [
244
+ 'font-family',
245
+ 'font-variant',
246
+ 'font-weight',
247
+ 'font-size',
248
+ 'font-style',
249
+ 'line-height'
250
+ ]
251
+ },
252
+ color: {
253
+ match: /^(?:color|fg):/,
254
+ layer: Layer.CoreNative,
255
+ colored: true,
256
+ variables: [
257
+ 'text'
258
+ ]
259
+ },
260
+ // margin
261
+ 'margin-left': {
262
+ match: /^ml:/,
263
+ layer: Layer.CoreNative,
264
+ unit: 'rem',
265
+ variables: [
266
+ 'spacing'
267
+ ]
268
+ },
269
+ 'margin-right': {
270
+ match: /^mr:/,
271
+ layer: Layer.CoreNative,
272
+ unit: 'rem',
273
+ variables: [
274
+ 'spacing'
275
+ ]
276
+ },
277
+ 'margin-top': {
278
+ match: /^mt:/,
279
+ layer: Layer.CoreNative,
280
+ unit: 'rem',
281
+ variables: [
282
+ 'spacing'
283
+ ]
284
+ },
285
+ 'margin-bottom': {
286
+ match: /^mb:/,
287
+ layer: Layer.CoreNative,
288
+ unit: 'rem',
289
+ variables: [
290
+ 'spacing'
291
+ ]
292
+ },
293
+ 'margin-x': {
294
+ match: /^(?:mx|margin-x):/,
295
+ unit: 'rem',
296
+ layer: Layer.CoreShorthand,
297
+ declare (value) {
298
+ return {
299
+ 'margin-left': value,
300
+ 'margin-right': value
301
+ };
302
+ },
303
+ variables: [
304
+ 'spacing'
305
+ ]
306
+ },
307
+ 'margin-y': {
308
+ match: /^(?:my|margin-y):/,
309
+ unit: 'rem',
310
+ layer: Layer.CoreShorthand,
311
+ declare (value) {
312
+ return {
313
+ 'margin-top': value,
314
+ 'margin-bottom': value
315
+ };
316
+ },
317
+ variables: [
318
+ 'spacing'
319
+ ]
320
+ },
321
+ margin: {
322
+ match: /^m:/,
323
+ unit: 'rem',
324
+ layer: Layer.CoreNativeShorthand,
325
+ variables: [
326
+ 'spacing'
327
+ ]
328
+ },
329
+ // margin inline
330
+ 'margin-inline-start': {
331
+ match: /^mis:/,
332
+ layer: Layer.CoreNative,
333
+ unit: 'rem',
334
+ variables: [
335
+ 'spacing'
336
+ ]
337
+ },
338
+ 'margin-inline-end': {
339
+ match: /^mie:/,
340
+ layer: Layer.CoreNative,
341
+ unit: 'rem',
342
+ variables: [
343
+ 'spacing'
344
+ ]
345
+ },
346
+ 'margin-inline': {
347
+ match: /^mi:/,
348
+ unit: 'rem',
349
+ layer: Layer.CoreNativeShorthand,
350
+ variables: [
351
+ 'spacing'
352
+ ]
353
+ },
354
+ // padding
355
+ 'padding-left': {
356
+ match: /^pl:/,
357
+ layer: Layer.CoreNative,
358
+ unit: 'rem',
359
+ variables: [
360
+ 'spacing'
361
+ ]
362
+ },
363
+ 'padding-right': {
364
+ match: /^pr:/,
365
+ layer: Layer.CoreNative,
366
+ unit: 'rem',
367
+ variables: [
368
+ 'spacing'
369
+ ]
370
+ },
371
+ 'padding-top': {
372
+ match: /^pt:/,
373
+ layer: Layer.CoreNative,
374
+ unit: 'rem',
375
+ variables: [
376
+ 'spacing'
377
+ ]
378
+ },
379
+ 'padding-bottom': {
380
+ match: /^pb:/,
381
+ layer: Layer.CoreNative,
382
+ unit: 'rem',
383
+ variables: [
384
+ 'spacing'
385
+ ]
386
+ },
387
+ 'padding-x': {
388
+ match: /^(?:px|padding-x):/,
389
+ unit: 'rem',
390
+ layer: Layer.CoreShorthand,
391
+ declare (value) {
392
+ return {
393
+ 'padding-left': value,
394
+ 'padding-right': value
395
+ };
396
+ },
397
+ variables: [
398
+ 'spacing'
399
+ ]
400
+ },
401
+ 'padding-y': {
402
+ match: /^(?:py|padding-y):/,
403
+ unit: 'rem',
404
+ layer: Layer.CoreShorthand,
405
+ declare (value) {
406
+ return {
407
+ 'padding-top': value,
408
+ 'padding-bottom': value
409
+ };
410
+ },
411
+ variables: [
412
+ 'spacing'
413
+ ]
414
+ },
415
+ padding: {
416
+ match: /^p:/,
417
+ unit: 'rem',
418
+ layer: Layer.CoreNativeShorthand,
419
+ variables: [
420
+ 'spacing'
421
+ ]
422
+ },
423
+ // padding inline
424
+ 'padding-inline-start': {
425
+ match: /^pis:/,
426
+ layer: Layer.CoreNative,
427
+ unit: 'rem',
428
+ variables: [
429
+ 'spacing'
430
+ ]
431
+ },
432
+ 'padding-inline-end': {
433
+ match: /^pie:/,
434
+ layer: Layer.CoreNative,
435
+ unit: 'rem',
436
+ variables: [
437
+ 'spacing'
438
+ ]
439
+ },
440
+ 'padding-inline': {
441
+ match: /^pi:/,
442
+ unit: 'rem',
443
+ layer: Layer.CoreNativeShorthand,
444
+ variables: [
445
+ 'spacing'
446
+ ]
447
+ },
448
+ // flex
449
+ 'flex-basis': {
450
+ unit: 'rem',
451
+ layer: Layer.CoreNative
452
+ },
453
+ 'flex-wrap': {
454
+ match: [
455
+ 'flex',
456
+ [
457
+ 'wrap',
458
+ 'nowrap',
459
+ 'wrap-reverse'
460
+ ]
461
+ ],
462
+ layer: Layer.CoreNative
463
+ },
464
+ 'flex-grow': {
465
+ layer: Layer.CoreNative
466
+ },
467
+ 'flex-shrink': {
468
+ layer: Layer.CoreNative
469
+ },
470
+ 'flex-direction': {
471
+ match: [
472
+ 'flex',
473
+ [
474
+ 'row',
475
+ 'row-reverse',
476
+ 'column',
477
+ 'column-reverse'
478
+ ]
479
+ ],
480
+ layer: Layer.CoreNative
481
+ },
482
+ flex: {
483
+ layer: Layer.CoreNativeShorthand
484
+ },
485
+ display: {
486
+ match: /^d:/,
487
+ layer: Layer.CoreNative
488
+ },
489
+ width: {
490
+ match: /^w:/,
491
+ unit: 'rem',
492
+ layer: Layer.CoreNative
493
+ },
494
+ height: {
495
+ match: /^h:/,
496
+ unit: 'rem',
497
+ layer: Layer.CoreNative
498
+ },
499
+ 'min-width': {
500
+ match: /^min-w:/,
501
+ unit: 'rem',
502
+ layer: Layer.CoreNative
503
+ },
504
+ 'min-height': {
505
+ match: /^min-h:/,
506
+ unit: 'rem',
507
+ layer: Layer.CoreNative
508
+ },
509
+ size: {
510
+ match: /^size:/,
511
+ layer: Layer.CoreShorthand,
512
+ unit: 'rem',
513
+ declare (value, valueComponents) {
514
+ const length = valueComponents.length;
515
+ return {
516
+ width: length === 1 ? valueComponents[0].text : valueComponents[0].text,
517
+ height: length === 1 ? valueComponents[0].text : valueComponents[2].text
518
+ };
519
+ }
520
+ },
521
+ 'min-size': {
522
+ match: /^min:/,
523
+ layer: Layer.CoreShorthand,
524
+ unit: 'rem',
525
+ declare (value, valueComponents) {
526
+ const length = valueComponents.length;
527
+ return {
528
+ 'min-width': length === 1 ? valueComponents[0].text : valueComponents[0].text,
529
+ 'min-height': length === 1 ? valueComponents[0].text : valueComponents[2].text
530
+ };
531
+ }
532
+ },
533
+ 'max-size': {
534
+ match: /^max:/,
535
+ layer: Layer.CoreShorthand,
536
+ unit: 'rem',
537
+ declare (value, valueComponents) {
538
+ const length = valueComponents.length;
539
+ return {
540
+ 'max-width': length === 1 ? valueComponents[0].text : valueComponents[0].text,
541
+ 'max-height': length === 1 ? valueComponents[0].text : valueComponents[2].text
542
+ };
543
+ }
544
+ },
545
+ 'box-sizing': {
546
+ match: /^box:/,
547
+ layer: Layer.CoreNative
548
+ },
549
+ 'box-decoration-break': {
550
+ match: [
551
+ 'box-decoration',
552
+ [
553
+ 'slice',
554
+ 'clone'
555
+ ]
556
+ ],
557
+ layer: Layer.CoreNative,
558
+ declare (value) {
559
+ return {
560
+ 'box-decoration-break': value,
561
+ '-webkit-box-decoration-break': value
562
+ };
563
+ }
564
+ },
565
+ contain: {
566
+ layer: Layer.CoreNative
567
+ },
568
+ content: {
569
+ layer: Layer.CoreNative
570
+ },
571
+ 'counter-increment': {
572
+ layer: Layer.CoreNative
573
+ },
574
+ 'counter-reset': {
575
+ layer: Layer.CoreNative
576
+ },
577
+ 'letter-spacing': {
578
+ match: /^ls:/,
579
+ layer: Layer.CoreNative,
580
+ unit: 'em'
581
+ },
582
+ 'line-height': {
583
+ match: /^lh:/,
584
+ layer: Layer.CoreNative
585
+ },
586
+ 'object-fit': {
587
+ match: [
588
+ '(?:object|obj)',
589
+ [
590
+ 'contain',
591
+ 'cover',
592
+ 'fill',
593
+ 'scale-down'
594
+ ]
595
+ ],
596
+ layer: Layer.CoreNative
597
+ },
598
+ 'object-position': {
599
+ match: [
600
+ '(?:object|obj)',
601
+ [
602
+ 'top',
603
+ 'bottom',
604
+ 'right',
605
+ 'left',
606
+ 'center'
607
+ ]
608
+ ],
609
+ layer: Layer.CoreNative
610
+ },
611
+ 'text-align': {
612
+ match: [
613
+ 't(?:ext)?',
614
+ [
615
+ 'justify',
616
+ 'center',
617
+ 'left',
618
+ 'right',
619
+ 'start',
620
+ 'end'
621
+ ]
622
+ ],
623
+ layer: Layer.CoreNative
624
+ },
625
+ 'text-decoration-color': {
626
+ match: [
627
+ 'text-decoration'
628
+ ],
629
+ layer: Layer.CoreNative,
630
+ colored: true,
631
+ variables: [
632
+ 'text'
633
+ ]
634
+ },
635
+ 'text-decoration-style': {
636
+ match: [
637
+ 't(?:ext)?',
638
+ [
639
+ 'solid',
640
+ 'double',
641
+ 'dotted',
642
+ 'dashed',
643
+ 'wavy'
644
+ ]
645
+ ],
646
+ layer: Layer.CoreNative
647
+ },
648
+ 'text-decoration-thickness': {
649
+ match: [
650
+ 'text-decoration',
651
+ [
652
+ 'from-font'
653
+ ]
654
+ ],
655
+ numeric: true,
656
+ layer: Layer.CoreNative,
657
+ unit: 'em'
658
+ },
659
+ 'text-decoration-line': {
660
+ match: [
661
+ 't(?:ext)?',
662
+ [
663
+ 'none',
664
+ 'underline',
665
+ 'overline',
666
+ 'line-through'
667
+ ]
668
+ ],
669
+ layer: Layer.CoreNative
670
+ },
671
+ 'text-decoration': {
672
+ match: [
673
+ 't(?:ext)?',
674
+ [
675
+ 'underline',
676
+ 'overline',
677
+ 'line-through'
678
+ ]
679
+ ],
680
+ unit: 'rem',
681
+ colored: true,
682
+ layer: Layer.CoreNativeShorthand,
683
+ variables: [
684
+ 'text'
685
+ ]
686
+ },
687
+ 'text-underline-offset': {
688
+ unit: 'rem',
689
+ layer: Layer.CoreNative,
690
+ variables: [
691
+ 'spacing'
692
+ ]
693
+ },
694
+ 'text-overflow': {
695
+ match: [
696
+ 't(?:ext)?',
697
+ [
698
+ 'ellipsis',
699
+ 'clip'
700
+ ]
701
+ ],
702
+ layer: Layer.CoreNative
703
+ },
704
+ 'text-orientation': {
705
+ match: [
706
+ 't(?:ext)?',
707
+ [
708
+ 'mixed',
709
+ 'upright',
710
+ 'sideways-right',
711
+ 'sideways',
712
+ 'use-glyph-orientation'
713
+ ]
714
+ ],
715
+ layer: Layer.CoreNative
716
+ },
717
+ 'text-transform': {
718
+ match: [
719
+ 't(?:ext)?',
720
+ [
721
+ 'uppercase',
722
+ 'lowercase',
723
+ 'capitalize'
724
+ ]
725
+ ],
726
+ layer: Layer.CoreNative
727
+ },
728
+ 'text-rendering': {
729
+ match: [
730
+ 't(?:ext)?',
731
+ [
732
+ 'optimizeSpeed',
733
+ 'optimizeLegibility',
734
+ 'geometricPrecision'
735
+ ]
736
+ ],
737
+ layer: Layer.CoreNative
738
+ },
739
+ 'text-indent': {
740
+ unit: 'rem',
741
+ layer: Layer.CoreNative
742
+ },
743
+ 'vertical-align': {
744
+ match: /^(?:v|vertical):/,
745
+ layer: Layer.CoreNative
746
+ },
747
+ columns: {
748
+ match: /^(?:columns|cols):/,
749
+ layer: Layer.CoreNativeShorthand
750
+ },
751
+ 'white-space': {
752
+ layer: Layer.CoreNative
753
+ },
754
+ top: {
755
+ layer: Layer.CoreNative,
756
+ unit: 'rem',
757
+ variables: [
758
+ 'spacing'
759
+ ]
760
+ },
761
+ bottom: {
762
+ layer: Layer.CoreNative,
763
+ unit: 'rem',
764
+ variables: [
765
+ 'spacing'
766
+ ]
767
+ },
768
+ left: {
769
+ layer: Layer.CoreNative,
770
+ unit: 'rem',
771
+ variables: [
772
+ 'spacing'
773
+ ]
774
+ },
775
+ right: {
776
+ layer: Layer.CoreNative,
777
+ unit: 'rem',
778
+ variables: [
779
+ 'spacing'
780
+ ]
781
+ },
782
+ inset: {
783
+ unit: 'rem',
784
+ layer: Layer.CoreNativeShorthand,
785
+ variables: [
786
+ 'spacing'
787
+ ]
788
+ },
789
+ lines: {
790
+ match: /^lines:/,
791
+ declare (value) {
792
+ return {
793
+ overflow: 'hidden',
794
+ display: '-webkit-box',
795
+ 'overflow-wrap': 'break-word',
796
+ 'text-overflow': 'ellipsis',
797
+ '-webkit-box-orient': 'vertical',
798
+ '-webkit-line-clamp': value
799
+ };
800
+ }
801
+ },
802
+ 'max-height': {
803
+ match: /^max-h:/,
804
+ unit: 'rem',
805
+ layer: Layer.CoreNative
806
+ },
807
+ 'max-width': {
808
+ match: /^max-w:/,
809
+ unit: 'rem',
810
+ layer: Layer.CoreNative
811
+ },
812
+ opacity: {
813
+ layer: Layer.CoreNative
814
+ },
815
+ visibility: {
816
+ layer: Layer.CoreNative
817
+ },
818
+ clear: {
819
+ layer: Layer.CoreNative
820
+ },
821
+ float: {
822
+ layer: Layer.CoreNative
823
+ },
824
+ isolation: {
825
+ layer: Layer.CoreNative
826
+ },
827
+ 'overflow-x': {
828
+ layer: Layer.CoreNative,
829
+ declare (value) {
830
+ return value === 'overlay' ? {
831
+ 'overflow-x': [
832
+ 'auto',
833
+ value
834
+ ]
835
+ } : {
836
+ 'overflow-x': value
837
+ };
838
+ }
839
+ },
840
+ 'overflow-y': {
841
+ layer: Layer.CoreNative,
842
+ declare (value) {
843
+ return value === 'overlay' ? {
844
+ 'overflow-y': [
845
+ 'auto',
846
+ value
847
+ ]
848
+ } : {
849
+ 'overflow-y': value
850
+ };
851
+ }
852
+ },
853
+ overflow: {
854
+ layer: Layer.CoreNativeShorthand,
855
+ declare (value) {
856
+ return value === 'overlay' ? {
857
+ overflow: [
858
+ 'auto',
859
+ value
860
+ ]
861
+ } : {
862
+ overflow: value
863
+ };
864
+ }
865
+ },
866
+ 'overscroll-behavior-x': {
867
+ layer: Layer.CoreNative
868
+ },
869
+ 'overscroll-behavior-y': {
870
+ layer: Layer.CoreNative
871
+ },
872
+ 'overscroll-behavior': {
873
+ layer: Layer.CoreNativeShorthand
874
+ },
875
+ 'z-index': {
876
+ match: /^z:/,
877
+ layer: Layer.CoreNative
878
+ },
879
+ position: {
880
+ layer: Layer.CoreNative
881
+ },
882
+ cursor: {
883
+ layer: Layer.CoreNative
884
+ },
885
+ 'pointer-events': {
886
+ layer: Layer.CoreNative
887
+ },
888
+ resize: {
889
+ layer: Layer.CoreNative
890
+ },
891
+ 'touch-action': {
892
+ layer: Layer.CoreNative
893
+ },
894
+ 'word-break': {
895
+ layer: Layer.CoreNative
896
+ },
897
+ 'word-spacing': {
898
+ layer: Layer.CoreNative,
899
+ unit: 'em'
900
+ },
901
+ 'user-drag': {
902
+ layer: Layer.CoreNative,
903
+ declare (value) {
904
+ return {
905
+ 'user-drag': value,
906
+ '-webkit-user-drag': value
907
+ };
908
+ }
909
+ },
910
+ 'user-select': {
911
+ layer: Layer.CoreNative,
912
+ declare (value) {
913
+ return {
914
+ 'user-select': value,
915
+ '-webkit-user-select': value
916
+ };
917
+ }
918
+ },
919
+ 'text-shadow': {
920
+ unit: 'rem',
921
+ layer: Layer.CoreNative,
922
+ colored: true
923
+ },
924
+ 'text-size': {
925
+ match: [
926
+ 't(?:ext)?'
927
+ ],
928
+ numeric: true,
929
+ unit: 'rem',
930
+ declare (value) {
931
+ const diff = .875;
932
+ return {
933
+ 'font-size': value,
934
+ 'line-height': `calc(${value} + ${diff}em)`
935
+ };
936
+ }
937
+ },
938
+ 'text-fill-color': {
939
+ match: [
940
+ '(?:text-fill|text|t)'
941
+ ],
942
+ layer: Layer.CoreNative,
943
+ colored: true,
944
+ variables: [
945
+ 'text'
946
+ ],
947
+ declare (value) {
948
+ return {
949
+ '-webkit-text-fill-color': value
950
+ };
951
+ }
952
+ },
953
+ 'text-stroke-width': {
954
+ match: [
955
+ 'text-stroke',
956
+ [
957
+ 'thin',
958
+ 'medium',
959
+ 'thick'
960
+ ]
961
+ ],
962
+ numeric: true,
963
+ unit: 'rem',
964
+ layer: Layer.CoreNative,
965
+ declare (value) {
966
+ return {
967
+ '-webkit-text-stroke-width': value
968
+ };
969
+ }
970
+ },
971
+ 'text-stroke-color': {
972
+ match: [
973
+ 'text-stroke'
974
+ ],
975
+ layer: Layer.CoreNative,
976
+ colored: true,
977
+ variables: [
978
+ 'text'
979
+ ],
980
+ declare (value) {
981
+ return {
982
+ '-webkit-text-stroke-color': value
983
+ };
984
+ }
985
+ },
986
+ 'text-stroke': {
987
+ unit: 'rem',
988
+ layer: Layer.CoreNative,
989
+ declare (value) {
990
+ return {
991
+ '-webkit-text-stroke': value
992
+ };
993
+ }
994
+ },
995
+ 'box-shadow': {
996
+ match: /^s(?:hadow)?:/,
997
+ unit: 'rem',
998
+ layer: Layer.CoreNative,
999
+ colored: true
1000
+ },
1001
+ 'table-layout': {
1002
+ layer: Layer.CoreNative
1003
+ },
1004
+ 'transform-box': {
1005
+ match: [
1006
+ 'transform'
1007
+ ],
1008
+ layer: Layer.CoreNative
1009
+ },
1010
+ 'transform-style': {
1011
+ match: [
1012
+ 'transform',
1013
+ [
1014
+ 'flat',
1015
+ 'preserve-3d'
1016
+ ]
1017
+ ],
1018
+ layer: Layer.CoreNative
1019
+ },
1020
+ 'transform-origin': {
1021
+ match: [
1022
+ 'transform',
1023
+ [
1024
+ 'top',
1025
+ 'bottom',
1026
+ 'right',
1027
+ 'left',
1028
+ 'center'
1029
+ ]
1030
+ ],
1031
+ numeric: true,
1032
+ unit: 'px',
1033
+ layer: Layer.CoreNative
1034
+ },
1035
+ transform: {
1036
+ match: /^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\(/,
1037
+ layer: Layer.CoreNative,
1038
+ analyze (className) {
1039
+ return [
1040
+ className.startsWith('transform') ? className.slice(10) : className
1041
+ ];
1042
+ },
1043
+ variables: [
1044
+ 'spacing'
1045
+ ]
1046
+ },
1047
+ 'transition-property': {
1048
+ match: /^~property:/,
1049
+ layer: Layer.CoreNative
1050
+ },
1051
+ 'transition-timing-function': {
1052
+ match: /^~easing:/,
1053
+ layer: Layer.CoreNative
1054
+ },
1055
+ 'transition-duration': {
1056
+ match: /^~duration:/,
1057
+ layer: Layer.CoreNative,
1058
+ unit: 'ms'
1059
+ },
1060
+ 'transition-delay': {
1061
+ match: /^~delay:/,
1062
+ layer: Layer.CoreNative,
1063
+ unit: 'ms'
1064
+ },
1065
+ transition: {
1066
+ match: /^~[^!*>+~:[@_]+\|/,
1067
+ analyze (className) {
1068
+ if (className.startsWith('~')) {
1069
+ return [
1070
+ className.slice(1)
1071
+ ];
1072
+ } else {
1073
+ const indexOfColon = className.indexOf(':');
1074
+ this.prefix = className.slice(0, indexOfColon + 1);
1075
+ return [
1076
+ className.slice(indexOfColon + 1)
1077
+ ];
1078
+ }
1079
+ },
1080
+ layer: Layer.CoreNativeShorthand
1081
+ },
1082
+ 'animation-delay': {
1083
+ match: /^@delay:/,
1084
+ layer: Layer.CoreNative,
1085
+ unit: 'ms'
1086
+ },
1087
+ 'animation-direction': {
1088
+ match: /^@direction:/,
1089
+ layer: Layer.CoreNative
1090
+ },
1091
+ 'animation-duration': {
1092
+ match: /^@duration:/,
1093
+ layer: Layer.CoreNative,
1094
+ unit: 'ms'
1095
+ },
1096
+ 'animation-fill-mode': {
1097
+ match: /^@fill:/,
1098
+ layer: Layer.CoreNative
1099
+ },
1100
+ 'animation-iteration-count': {
1101
+ match: /^@iteration:/,
1102
+ layer: Layer.CoreNative
1103
+ },
1104
+ 'animation-name': {
1105
+ match: /^@name:/,
1106
+ layer: Layer.CoreNative
1107
+ },
1108
+ 'animation-play-state': {
1109
+ match: /^@play:/,
1110
+ layer: Layer.CoreNative
1111
+ },
1112
+ 'animation-timing-function': {
1113
+ match: /^@easing:/,
1114
+ layer: Layer.CoreNative
1115
+ },
1116
+ animation: {
1117
+ match: /^@[^!*>+~:[@_]+\|/,
1118
+ layer: Layer.CoreNativeShorthand,
1119
+ analyze (className) {
1120
+ if (className.startsWith('@')) {
1121
+ return [
1122
+ className.slice(1)
1123
+ ];
1124
+ } else {
1125
+ const indexOfColon = className.indexOf(':');
1126
+ this.prefix = className.slice(0, indexOfColon + 1);
1127
+ return [
1128
+ className.slice(indexOfColon + 1)
1129
+ ];
1130
+ }
1131
+ }
1132
+ },
1133
+ 'border-collapse': {
1134
+ match: [
1135
+ 'b(?:order)?',
1136
+ [
1137
+ 'collapse',
1138
+ 'separate'
1139
+ ]
1140
+ ],
1141
+ layer: Layer.CoreNative
1142
+ },
1143
+ 'border-spacing': {
1144
+ unit: 'rem',
1145
+ layer: Layer.CoreNative
1146
+ },
1147
+ // border color
1148
+ 'border-top-color': {
1149
+ match: [
1150
+ 'b(?:t|order-top(?:-color)?)'
1151
+ ],
1152
+ layer: Layer.CoreNative,
1153
+ colored: true
1154
+ },
1155
+ 'border-bottom-color': {
1156
+ match: [
1157
+ 'b(?:b|order-bottom(?:-color)?)'
1158
+ ],
1159
+ layer: Layer.CoreNative,
1160
+ colored: true
1161
+ },
1162
+ 'border-left-color': {
1163
+ match: [
1164
+ 'b(?:l|order-left(?:-color)?)'
1165
+ ],
1166
+ layer: Layer.CoreNative,
1167
+ colored: true
1168
+ },
1169
+ 'border-right-color': {
1170
+ match: [
1171
+ 'b(?:r|order-right(?:-color)?)'
1172
+ ],
1173
+ layer: Layer.CoreNative,
1174
+ colored: true
1175
+ },
1176
+ 'border-x-color': {
1177
+ match: [
1178
+ 'b(?:x|order-x(?:-color)?)'
1179
+ ],
1180
+ layer: Layer.CoreShorthand,
1181
+ colored: true,
1182
+ declare (value) {
1183
+ return {
1184
+ 'border-left-color': value,
1185
+ 'border-right-color': value
1186
+ };
1187
+ }
1188
+ },
1189
+ 'border-y-color': {
1190
+ match: [
1191
+ 'b(?:y|order-y(?:-color)?)'
1192
+ ],
1193
+ layer: Layer.CoreShorthand,
1194
+ colored: true,
1195
+ declare (value) {
1196
+ return {
1197
+ 'border-top-color': value,
1198
+ 'border-bottom-color': value
1199
+ };
1200
+ }
1201
+ },
1202
+ 'border-color': {
1203
+ match: [
1204
+ 'b(?:order)?(?:-color)?'
1205
+ ],
1206
+ layer: Layer.CoreNativeShorthand,
1207
+ colored: true
1208
+ },
1209
+ // border radius
1210
+ 'border-top-left-radius': {
1211
+ match: /^r(?:tl|lt):/,
1212
+ unit: 'rem',
1213
+ layer: Layer.CoreNative
1214
+ },
1215
+ 'border-top-right-radius': {
1216
+ match: /^r(?:tr|rt):/,
1217
+ unit: 'rem',
1218
+ layer: Layer.CoreNative
1219
+ },
1220
+ 'border-bottom-left-radius': {
1221
+ match: /^r(?:bl|lb):/,
1222
+ unit: 'rem',
1223
+ layer: Layer.CoreNative
1224
+ },
1225
+ 'border-bottom-right-radius': {
1226
+ match: /^r(?:br|rb):/,
1227
+ unit: 'rem',
1228
+ layer: Layer.CoreNative
1229
+ },
1230
+ 'border-top-radius': {
1231
+ match: /^rt:/,
1232
+ unit: 'rem',
1233
+ layer: Layer.CoreShorthand,
1234
+ declare (value) {
1235
+ return {
1236
+ 'border-top-left-radius': value,
1237
+ 'border-top-right-radius': value
1238
+ };
1239
+ }
1240
+ },
1241
+ 'border-bottom-radius': {
1242
+ match: /^rb:/,
1243
+ unit: 'rem',
1244
+ layer: Layer.CoreShorthand,
1245
+ declare (value) {
1246
+ return {
1247
+ 'border-bottom-left-radius': value,
1248
+ 'border-bottom-right-radius': value
1249
+ };
1250
+ }
1251
+ },
1252
+ 'border-left-radius': {
1253
+ match: /^rl:/,
1254
+ unit: 'rem',
1255
+ layer: Layer.CoreShorthand,
1256
+ declare (value) {
1257
+ return {
1258
+ 'border-top-left-radius': value,
1259
+ 'border-bottom-left-radius': value
1260
+ };
1261
+ }
1262
+ },
1263
+ 'border-right-radius': {
1264
+ match: /^rr:/,
1265
+ unit: 'rem',
1266
+ layer: Layer.CoreShorthand,
1267
+ declare (value) {
1268
+ return {
1269
+ 'border-top-right-radius': value,
1270
+ 'border-bottom-right-radius': value
1271
+ };
1272
+ }
1273
+ },
1274
+ 'border-radius': {
1275
+ match: /^r:/,
1276
+ unit: 'rem',
1277
+ layer: Layer.CoreNativeShorthand
1278
+ },
1279
+ // border style
1280
+ 'border-top-style': {
1281
+ match: [
1282
+ 'b(?:t|order-top(?:-style)?)',
1283
+ BORDER_STYLES
1284
+ ],
1285
+ layer: Layer.CoreNative
1286
+ },
1287
+ 'border-bottom-style': {
1288
+ match: [
1289
+ 'b(?:b|order-bottom(?:-style)?)',
1290
+ BORDER_STYLES
1291
+ ],
1292
+ layer: Layer.CoreNative
1293
+ },
1294
+ 'border-left-style': {
1295
+ match: [
1296
+ 'b(?:l|order-left(?:-style)?)',
1297
+ BORDER_STYLES
1298
+ ],
1299
+ layer: Layer.CoreNative
1300
+ },
1301
+ 'border-right-style': {
1302
+ match: [
1303
+ 'b(?:r|order-right(?:-style)?)',
1304
+ BORDER_STYLES
1305
+ ],
1306
+ layer: Layer.CoreNative
1307
+ },
1308
+ 'border-x-style': {
1309
+ match: [
1310
+ 'b(?:x|order-x(?:-style)?)',
1311
+ BORDER_STYLES
1312
+ ],
1313
+ layer: Layer.CoreShorthand,
1314
+ declare (value) {
1315
+ return {
1316
+ 'border-left-style': value,
1317
+ 'border-right-style': value
1318
+ };
1319
+ }
1320
+ },
1321
+ 'border-y-style': {
1322
+ match: [
1323
+ 'b(?:y|order-y(?:-style)?)',
1324
+ BORDER_STYLES
1325
+ ],
1326
+ layer: Layer.CoreShorthand,
1327
+ declare (value) {
1328
+ return {
1329
+ 'border-top-style': value,
1330
+ 'border-bottom-style': value
1331
+ };
1332
+ }
1333
+ },
1334
+ 'border-style': {
1335
+ match: [
1336
+ 'b(?:order)?(?:-style)?',
1337
+ BORDER_STYLES
1338
+ ],
1339
+ layer: Layer.CoreNativeShorthand
1340
+ },
1341
+ // border width
1342
+ 'border-top-width': {
1343
+ match: [
1344
+ 'b(?:t|order-top(?:-width)?)'
1345
+ ],
1346
+ numeric: true,
1347
+ unit: 'rem',
1348
+ layer: Layer.CoreNative
1349
+ },
1350
+ 'border-bottom-width': {
1351
+ match: [
1352
+ 'b(?:b|order-bottom(?:-width)?)'
1353
+ ],
1354
+ numeric: true,
1355
+ unit: 'rem',
1356
+ layer: Layer.CoreNative
1357
+ },
1358
+ 'border-left-width': {
1359
+ match: [
1360
+ 'b(?:l|order-left(?:-width)?)'
1361
+ ],
1362
+ numeric: true,
1363
+ unit: 'rem',
1364
+ layer: Layer.CoreNative
1365
+ },
1366
+ 'border-right-width': {
1367
+ match: [
1368
+ 'b(?:r|order-right(?:-width)?)'
1369
+ ],
1370
+ numeric: true,
1371
+ unit: 'rem',
1372
+ layer: Layer.CoreNative
1373
+ },
1374
+ 'border-x-width': {
1375
+ match: [
1376
+ 'b(?:x|order-x(?:-width)?)'
1377
+ ],
1378
+ numeric: true,
1379
+ unit: 'rem',
1380
+ layer: Layer.CoreShorthand,
1381
+ declare (value) {
1382
+ return {
1383
+ 'border-left-width': value,
1384
+ 'border-right-width': value
1385
+ };
1386
+ }
1387
+ },
1388
+ 'border-y-width': {
1389
+ match: [
1390
+ 'b(?:y|order-y(?:-width)?)'
1391
+ ],
1392
+ numeric: true,
1393
+ unit: 'rem',
1394
+ layer: Layer.CoreShorthand,
1395
+ declare (value) {
1396
+ return {
1397
+ 'border-top-width': value,
1398
+ 'border-bottom-width': value
1399
+ };
1400
+ }
1401
+ },
1402
+ 'border-width': {
1403
+ match: [
1404
+ 'b(?:order)?(?:-width)?'
1405
+ ],
1406
+ numeric: true,
1407
+ unit: 'rem',
1408
+ layer: Layer.CoreNativeShorthand
1409
+ },
1410
+ // border image
1411
+ 'border-image-outset': {
1412
+ unit: 'rem',
1413
+ layer: Layer.CoreNative
1414
+ },
1415
+ 'border-image-repeat': {
1416
+ match: [
1417
+ 'border-image',
1418
+ [
1419
+ 'stretch',
1420
+ 'repeat',
1421
+ 'round',
1422
+ 'space'
1423
+ ]
1424
+ ],
1425
+ layer: Layer.CoreNative
1426
+ },
1427
+ 'border-image-slice': {
1428
+ layer: Layer.CoreNative
1429
+ },
1430
+ 'border-image-source': {
1431
+ match: [
1432
+ 'border-image',
1433
+ [
1434
+ 'url',
1435
+ 'linear-gradient',
1436
+ 'radial-gradient',
1437
+ 'repeating-linear-gradient',
1438
+ 'repeating-radial-gradient',
1439
+ 'conic-gradient'
1440
+ ]
1441
+ ],
1442
+ layer: Layer.CoreNative
1443
+ },
1444
+ 'border-image-width': {
1445
+ match: [
1446
+ 'border-image',
1447
+ [
1448
+ 'auto'
1449
+ ]
1450
+ ],
1451
+ numeric: true,
1452
+ unit: 'rem',
1453
+ layer: Layer.CoreNative
1454
+ },
1455
+ 'border-image': {
1456
+ layer: Layer.CoreNativeShorthand
1457
+ },
1458
+ // border
1459
+ 'border-top': {
1460
+ match: /^bt:/,
1461
+ layer: Layer.CoreNativeShorthand,
1462
+ unit: 'rem',
1463
+ colored: true,
1464
+ transformValueComponents: autofillSolidToValueComponent
1465
+ },
1466
+ 'border-bottom': {
1467
+ match: /^bb:/,
1468
+ layer: Layer.CoreNativeShorthand,
1469
+ unit: 'rem',
1470
+ colored: true,
1471
+ transformValueComponents: autofillSolidToValueComponent
1472
+ },
1473
+ 'border-left': {
1474
+ match: /^bl:/,
1475
+ layer: Layer.CoreNativeShorthand,
1476
+ unit: 'rem',
1477
+ colored: true,
1478
+ transformValueComponents: autofillSolidToValueComponent
1479
+ },
1480
+ 'border-right': {
1481
+ match: /^br:/,
1482
+ layer: Layer.CoreNativeShorthand,
1483
+ unit: 'rem',
1484
+ colored: true,
1485
+ transformValueComponents: autofillSolidToValueComponent
1486
+ },
1487
+ 'border-x': {
1488
+ match: /^(?:bx|border-x):/,
1489
+ unit: 'rem',
1490
+ colored: true,
1491
+ layer: Layer.CoreShorthand,
1492
+ transformValueComponents: autofillSolidToValueComponent,
1493
+ declare (value) {
1494
+ return {
1495
+ 'border-left': value,
1496
+ 'border-right': value
1497
+ };
1498
+ }
1499
+ },
1500
+ 'border-y': {
1501
+ match: /^(?:by|border-y):/,
1502
+ unit: 'rem',
1503
+ colored: true,
1504
+ layer: Layer.CoreShorthand,
1505
+ transformValueComponents: autofillSolidToValueComponent,
1506
+ declare (value) {
1507
+ return {
1508
+ 'border-top': value,
1509
+ 'border-bottom': value
1510
+ };
1511
+ }
1512
+ },
1513
+ border: {
1514
+ match: /^b:/,
1515
+ unit: 'rem',
1516
+ colored: true,
1517
+ layer: Layer.CoreNativeShorthand,
1518
+ transformValueComponents: autofillSolidToValueComponent
1519
+ },
1520
+ 'background-attachment': {
1521
+ match: [
1522
+ '(?:bg|background)',
1523
+ [
1524
+ 'fixed',
1525
+ 'local',
1526
+ 'scroll'
1527
+ ]
1528
+ ],
1529
+ layer: Layer.CoreNative
1530
+ },
1531
+ 'background-blend-mode': {
1532
+ layer: Layer.CoreNative
1533
+ },
1534
+ 'background-color': {
1535
+ match: [
1536
+ '(?:bg|background)'
1537
+ ],
1538
+ layer: Layer.CoreNative,
1539
+ colored: true
1540
+ },
1541
+ 'background-clip': {
1542
+ match: [
1543
+ '(?:bg|background)',
1544
+ [
1545
+ 'text'
1546
+ ]
1547
+ ],
1548
+ layer: Layer.CoreNative,
1549
+ declare (value) {
1550
+ return {
1551
+ '-webkit-background-clip': value,
1552
+ 'background-clip': value
1553
+ };
1554
+ }
1555
+ },
1556
+ 'background-origin': {
1557
+ match: [
1558
+ '(?:bg|background)'
1559
+ ],
1560
+ layer: Layer.CoreNative
1561
+ },
1562
+ 'background-position': {
1563
+ match: [
1564
+ '(?:bg|background)',
1565
+ [
1566
+ 'top',
1567
+ 'bottom',
1568
+ 'right',
1569
+ 'left',
1570
+ 'center'
1571
+ ]
1572
+ ],
1573
+ layer: Layer.CoreNative,
1574
+ unit: 'px'
1575
+ },
1576
+ 'background-repeat': {
1577
+ match: [
1578
+ '(?:bg|background)',
1579
+ [
1580
+ 'space',
1581
+ 'round',
1582
+ 'repeat',
1583
+ 'no-repeat',
1584
+ 'repeat-x',
1585
+ 'repeat-y'
1586
+ ]
1587
+ ],
1588
+ layer: Layer.CoreNative
1589
+ },
1590
+ 'background-size': {
1591
+ match: [
1592
+ '(?:bg|background)',
1593
+ [
1594
+ 'auto',
1595
+ 'cover',
1596
+ 'contain'
1597
+ ]
1598
+ ],
1599
+ numeric: true,
1600
+ unit: 'rem',
1601
+ layer: Layer.CoreNative
1602
+ },
1603
+ 'background-image': {
1604
+ match: [
1605
+ '(?:bg|background)',
1606
+ [
1607
+ '(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)'
1608
+ ]
1609
+ ],
1610
+ layer: Layer.CoreNative
1611
+ },
1612
+ background: {
1613
+ match: /^bg:/,
1614
+ colored: true,
1615
+ layer: Layer.CoreNativeShorthand
1616
+ },
1617
+ gradient: {
1618
+ match: /^gradient\(/,
1619
+ layer: Layer.CoreNative,
1620
+ colored: true,
1621
+ declare (value) {
1622
+ return {
1623
+ 'background-image': 'linear-' + value
1624
+ };
1625
+ }
1626
+ },
1627
+ 'mix-blend-mode': {
1628
+ match: /^blend:/,
1629
+ layer: Layer.CoreNative
1630
+ },
1631
+ 'backdrop-filter': {
1632
+ match: /^bd:/,
1633
+ layer: Layer.CoreNative,
1634
+ colored: true,
1635
+ declare (value) {
1636
+ return {
1637
+ 'backdrop-filter': value,
1638
+ '-webkit-backdrop-filter': value
1639
+ };
1640
+ }
1641
+ },
1642
+ filter: {
1643
+ match: /^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\(/,
1644
+ layer: Layer.CoreNative,
1645
+ colored: true
1646
+ },
1647
+ fill: {
1648
+ match: /^fill:/,
1649
+ layer: Layer.CoreNative,
1650
+ colored: true
1651
+ },
1652
+ 'stroke-dasharray': {
1653
+ layer: Layer.CoreNative
1654
+ },
1655
+ 'stroke-dashoffset': {
1656
+ layer: Layer.CoreNative,
1657
+ variables: [
1658
+ 'spacing'
1659
+ ]
1660
+ },
1661
+ 'stroke-width': {
1662
+ match: [
1663
+ 'stroke(?:-width)?'
1664
+ ],
1665
+ numeric: true,
1666
+ layer: Layer.CoreNative
1667
+ },
1668
+ stroke: {
1669
+ match: [
1670
+ 'stroke'
1671
+ ],
1672
+ layer: Layer.CoreNative,
1673
+ colored: true
1674
+ },
1675
+ x: {
1676
+ layer: Layer.CoreNative,
1677
+ variables: [
1678
+ 'spacing'
1679
+ ]
1680
+ },
1681
+ y: {
1682
+ layer: Layer.CoreNative,
1683
+ variables: [
1684
+ 'spacing'
1685
+ ]
1686
+ },
1687
+ cx: {
1688
+ layer: Layer.CoreNative,
1689
+ variables: [
1690
+ 'spacing'
1691
+ ]
1692
+ },
1693
+ cy: {
1694
+ layer: Layer.CoreNative,
1695
+ variables: [
1696
+ 'spacing'
1697
+ ]
1698
+ },
1699
+ rx: {
1700
+ layer: Layer.CoreNative
1701
+ },
1702
+ ry: {
1703
+ layer: Layer.CoreNative
1704
+ },
1705
+ 'grid-column-start': {
1706
+ match: /^grid-col(?:umn)?-start:/,
1707
+ layer: Layer.CoreNative
1708
+ },
1709
+ 'grid-column-end': {
1710
+ match: /^grid-col(?:umn)?-end:/,
1711
+ layer: Layer.CoreNative
1712
+ },
1713
+ 'grid-column': {
1714
+ match: /^grid-col(?:umn)?(?:-span)?:/,
1715
+ layer: Layer.CoreNativeShorthand,
1716
+ transformValue (value) {
1717
+ return this.prefix.slice(-5, -1) === 'span' && value !== 'auto' ? 'span' + ' ' + value + '/' + 'span' + ' ' + value : value;
1718
+ }
1719
+ },
1720
+ 'grid-columns': {
1721
+ match: /^grid-col(?:umn)?s:/,
1722
+ declare (value) {
1723
+ return {
1724
+ display: 'grid',
1725
+ 'grid-template-columns': 'repeat' + '(' + value + ',' + 'minmax' + '(' + 0 + ',' + 1 + 'fr' + '))'
1726
+ };
1727
+ },
1728
+ layer: Layer.Core
1729
+ },
1730
+ 'grid-row-start': {
1731
+ layer: Layer.CoreNative
1732
+ },
1733
+ 'grid-row-end': {
1734
+ layer: Layer.CoreNative
1735
+ },
1736
+ 'grid-row': {
1737
+ match: /^grid-row-span:/,
1738
+ layer: Layer.CoreNativeShorthand,
1739
+ transformValue (value) {
1740
+ return this.prefix.slice(-5, -1) === 'span' && value !== 'auto' ? 'span' + ' ' + value + '/' + 'span' + ' ' + value : value;
1741
+ }
1742
+ },
1743
+ 'grid-rows': {
1744
+ match: /^grid-rows:/,
1745
+ declare (value) {
1746
+ return {
1747
+ display: 'grid',
1748
+ 'grid-auto-flow': 'column',
1749
+ 'grid-template-rows': 'repeat' + '(' + value + ',' + 'minmax' + '(' + 0 + ',' + 1 + 'fr' + '))'
1750
+ };
1751
+ },
1752
+ layer: Layer.Core
1753
+ },
1754
+ 'grid-auto-columns': {
1755
+ match: /^grid-auto-cols:/,
1756
+ layer: Layer.CoreNative
1757
+ },
1758
+ 'grid-auto-flow': {
1759
+ match: /^grid-flow:/,
1760
+ layer: Layer.CoreNative
1761
+ },
1762
+ 'grid-auto-rows': {
1763
+ layer: Layer.CoreNative
1764
+ },
1765
+ 'grid-template-areas': {
1766
+ layer: Layer.CoreNative
1767
+ },
1768
+ 'grid-template-columns': {
1769
+ match: /^grid-template-cols:/,
1770
+ layer: Layer.CoreNative,
1771
+ unit: 'rem'
1772
+ },
1773
+ 'grid-template-rows': {
1774
+ layer: Layer.CoreNative,
1775
+ unit: 'rem'
1776
+ },
1777
+ 'grid-template': {
1778
+ layer: Layer.CoreNativeShorthand
1779
+ },
1780
+ 'grid-area': {
1781
+ layer: Layer.CoreNativeShorthand
1782
+ },
1783
+ grid: {
1784
+ layer: Layer.CoreNativeShorthand
1785
+ },
1786
+ 'column-gap': {
1787
+ match: /^gap-x:/,
1788
+ unit: 'rem',
1789
+ layer: Layer.CoreNative,
1790
+ variables: [
1791
+ 'spacing'
1792
+ ]
1793
+ },
1794
+ 'row-gap': {
1795
+ match: /^gap-y:/,
1796
+ unit: 'rem',
1797
+ layer: Layer.CoreNative,
1798
+ variables: [
1799
+ 'spacing'
1800
+ ]
1801
+ },
1802
+ gap: {
1803
+ unit: 'rem',
1804
+ layer: Layer.CoreNativeShorthand,
1805
+ variables: [
1806
+ 'spacing'
1807
+ ]
1808
+ },
1809
+ order: {
1810
+ match: /^o:/,
1811
+ layer: Layer.CoreNative
1812
+ },
1813
+ 'break-inside': {
1814
+ layer: Layer.CoreNative
1815
+ },
1816
+ 'break-before': {
1817
+ layer: Layer.CoreNative
1818
+ },
1819
+ 'break-after': {
1820
+ layer: Layer.CoreNative
1821
+ },
1822
+ 'aspect-ratio': {
1823
+ match: /^aspect:/,
1824
+ layer: Layer.CoreNative
1825
+ },
1826
+ 'column-span': {
1827
+ match: /^col-span:/,
1828
+ layer: Layer.CoreNative
1829
+ },
1830
+ 'align-content': {
1831
+ match: /^ac:/,
1832
+ layer: Layer.CoreNative
1833
+ },
1834
+ 'align-items': {
1835
+ match: /^ai:/,
1836
+ layer: Layer.CoreNative
1837
+ },
1838
+ 'align-self': {
1839
+ match: /^as:/,
1840
+ layer: Layer.CoreNative
1841
+ },
1842
+ 'justify-content': {
1843
+ match: /^jc:/,
1844
+ layer: Layer.CoreNative
1845
+ },
1846
+ 'justify-items': {
1847
+ match: /^ji:/,
1848
+ layer: Layer.CoreNative
1849
+ },
1850
+ 'justify-self': {
1851
+ match: /^js:/,
1852
+ layer: Layer.CoreNative
1853
+ },
1854
+ 'place-content': {
1855
+ layer: Layer.CoreNativeShorthand
1856
+ },
1857
+ 'place-items': {
1858
+ layer: Layer.CoreNativeShorthand
1859
+ },
1860
+ 'place-self': {
1861
+ layer: Layer.CoreNativeShorthand
1862
+ },
1863
+ 'list-style-position': {
1864
+ match: [
1865
+ 'list-style',
1866
+ [
1867
+ 'inside',
1868
+ 'outside'
1869
+ ]
1870
+ ],
1871
+ layer: Layer.CoreNative
1872
+ },
1873
+ 'list-style-type': {
1874
+ match: [
1875
+ 'list-style',
1876
+ [
1877
+ 'disc',
1878
+ 'decimal'
1879
+ ]
1880
+ ],
1881
+ layer: Layer.CoreNative
1882
+ },
1883
+ 'list-style-image': {
1884
+ match: [
1885
+ 'list-style',
1886
+ [
1887
+ '(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)'
1888
+ ]
1889
+ ],
1890
+ layer: Layer.CoreNative
1891
+ },
1892
+ 'list-style': {
1893
+ layer: Layer.CoreNativeShorthand
1894
+ },
1895
+ 'outline-color': {
1896
+ match: [
1897
+ 'outline'
1898
+ ],
1899
+ layer: Layer.CoreNative,
1900
+ colored: true
1901
+ },
1902
+ 'outline-offset': {
1903
+ unit: 'rem',
1904
+ layer: Layer.CoreNative,
1905
+ variables: [
1906
+ 'spacing'
1907
+ ]
1908
+ },
1909
+ 'outline-style': {
1910
+ match: [
1911
+ 'outline',
1912
+ BORDER_STYLES
1913
+ ],
1914
+ layer: Layer.CoreNative
1915
+ },
1916
+ 'outline-width': {
1917
+ match: [
1918
+ 'outline',
1919
+ [
1920
+ 'medium',
1921
+ 'thick',
1922
+ 'thin'
1923
+ ]
1924
+ ],
1925
+ numeric: true,
1926
+ unit: 'rem',
1927
+ layer: Layer.CoreNative
1928
+ },
1929
+ outline: {
1930
+ unit: 'rem',
1931
+ layer: Layer.CoreNativeShorthand,
1932
+ colored: true,
1933
+ variables: [
1934
+ 'outline-width',
1935
+ 'outline-style',
1936
+ 'outline-offset',
1937
+ 'outline-color'
1938
+ ],
1939
+ transformValueComponents: autofillSolidToValueComponent
1940
+ },
1941
+ 'accent-color': {
1942
+ match: /^accent:/,
1943
+ layer: Layer.CoreNative,
1944
+ colored: true
1945
+ },
1946
+ appearance: {
1947
+ layer: Layer.CoreNative
1948
+ },
1949
+ 'caret-color': {
1950
+ match: /^caret:/,
1951
+ layer: Layer.CoreNative,
1952
+ colored: true,
1953
+ variables: [
1954
+ 'text'
1955
+ ]
1956
+ },
1957
+ 'scroll-behavior': {
1958
+ layer: Layer.CoreNative
1959
+ },
1960
+ // scroll margin
1961
+ 'scroll-margin-left': {
1962
+ match: /^scroll-ml:/,
1963
+ layer: Layer.CoreNative,
1964
+ unit: 'rem',
1965
+ variables: [
1966
+ 'spacing'
1967
+ ]
1968
+ },
1969
+ 'scroll-margin-right': {
1970
+ match: /^scroll-mr:/,
1971
+ layer: Layer.CoreNative,
1972
+ unit: 'rem',
1973
+ variables: [
1974
+ 'spacing'
1975
+ ]
1976
+ },
1977
+ 'scroll-margin-top': {
1978
+ match: /^scroll-mt:/,
1979
+ layer: Layer.CoreNative,
1980
+ unit: 'rem',
1981
+ variables: [
1982
+ 'spacing'
1983
+ ]
1984
+ },
1985
+ 'scroll-margin-bottom': {
1986
+ match: /^scroll-mb:/,
1987
+ layer: Layer.CoreNative,
1988
+ unit: 'rem',
1989
+ variables: [
1990
+ 'spacing'
1991
+ ]
1992
+ },
1993
+ 'scroll-margin-x': {
1994
+ match: /^(?:scroll-margin-x|scroll-mx):/,
1995
+ unit: 'rem',
1996
+ layer: Layer.CoreShorthand,
1997
+ declare (value) {
1998
+ return {
1999
+ 'scroll-margin-left': value,
2000
+ 'scroll-margin-right': value
2001
+ };
2002
+ },
2003
+ variables: [
2004
+ 'spacing'
2005
+ ]
2006
+ },
2007
+ 'scroll-margin-y': {
2008
+ match: /^(?:scroll-margin-y|scroll-my):/,
2009
+ unit: 'rem',
2010
+ layer: Layer.CoreShorthand,
2011
+ declare (value) {
2012
+ return {
2013
+ 'scroll-margin-top': value,
2014
+ 'scroll-margin-bottom': value
2015
+ };
2016
+ },
2017
+ variables: [
2018
+ 'spacing'
2019
+ ]
2020
+ },
2021
+ 'scroll-margin': {
2022
+ match: /^scroll-m:/,
2023
+ unit: 'rem',
2024
+ layer: Layer.CoreNativeShorthand,
2025
+ variables: [
2026
+ 'spacing'
2027
+ ]
2028
+ },
2029
+ // scroll padding
2030
+ 'scroll-padding-left': {
2031
+ match: /^scroll-pl:/,
2032
+ layer: Layer.CoreNative,
2033
+ unit: 'rem',
2034
+ variables: [
2035
+ 'spacing'
2036
+ ]
2037
+ },
2038
+ 'scroll-padding-right': {
2039
+ match: /^scroll-pr:/,
2040
+ layer: Layer.CoreNative,
2041
+ unit: 'rem',
2042
+ variables: [
2043
+ 'spacing'
2044
+ ]
2045
+ },
2046
+ 'scroll-padding-top': {
2047
+ match: /^scroll-pt:/,
2048
+ layer: Layer.CoreNative,
2049
+ unit: 'rem',
2050
+ variables: [
2051
+ 'spacing'
2052
+ ]
2053
+ },
2054
+ 'scroll-padding-bottom': {
2055
+ match: /^scroll-pb:/,
2056
+ layer: Layer.CoreNative,
2057
+ unit: 'rem',
2058
+ variables: [
2059
+ 'spacing'
2060
+ ]
2061
+ },
2062
+ 'scroll-padding-x': {
2063
+ match: /^(?:scroll-padding-x|scroll-px):/,
2064
+ unit: 'rem',
2065
+ layer: Layer.CoreShorthand,
2066
+ declare (value) {
2067
+ return {
2068
+ 'scroll-padding-left': value,
2069
+ 'scroll-padding-right': value
2070
+ };
2071
+ },
2072
+ variables: [
2073
+ 'spacing'
2074
+ ]
2075
+ },
2076
+ 'scroll-padding-y': {
2077
+ match: /^(?:scroll-padding-y|scroll-py):/,
2078
+ unit: 'rem',
2079
+ layer: Layer.CoreShorthand,
2080
+ declare (value) {
2081
+ return {
2082
+ 'scroll-padding-top': value,
2083
+ 'scroll-padding-bottom': value
2084
+ };
2085
+ },
2086
+ variables: [
2087
+ 'spacing'
2088
+ ]
2089
+ },
2090
+ 'scroll-padding': {
2091
+ match: /^scroll-p:/,
2092
+ unit: 'rem',
2093
+ layer: Layer.CoreNativeShorthand,
2094
+ variables: [
2095
+ 'spacing'
2096
+ ]
2097
+ },
2098
+ // scroll snap
2099
+ 'scroll-snap-align': {
2100
+ match: [
2101
+ 'scroll-snap',
2102
+ [
2103
+ 'start',
2104
+ 'end',
2105
+ 'center'
2106
+ ]
2107
+ ],
2108
+ layer: Layer.CoreNative
2109
+ },
2110
+ 'scroll-snap-stop': {
2111
+ match: [
2112
+ 'scroll-snap',
2113
+ [
2114
+ 'normal',
2115
+ 'always'
2116
+ ]
2117
+ ],
2118
+ layer: Layer.CoreNative
2119
+ },
2120
+ 'scroll-snap-type': {
2121
+ match: [
2122
+ 'scroll-snap',
2123
+ [
2124
+ 'x',
2125
+ 'y',
2126
+ 'block',
2127
+ 'inline',
2128
+ 'both'
2129
+ ]
2130
+ ],
2131
+ layer: Layer.CoreNative
2132
+ },
2133
+ 'will-change': {
2134
+ layer: Layer.CoreNative
2135
+ },
2136
+ 'writing-mode': {
2137
+ match: /^writing:/,
2138
+ layer: Layer.CoreNative
2139
+ },
2140
+ direction: {
2141
+ layer: Layer.CoreNative
2142
+ },
2143
+ 'shape-outside': {
2144
+ match: [
2145
+ 'shape',
2146
+ [
2147
+ '(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)'
2148
+ ]
2149
+ ],
2150
+ layer: Layer.CoreNative
2151
+ },
2152
+ 'shape-margin': {
2153
+ match: [
2154
+ 'shape'
2155
+ ],
2156
+ numeric: true,
2157
+ unit: 'rem',
2158
+ layer: Layer.CoreNative,
2159
+ variables: [
2160
+ 'spacing'
2161
+ ]
2162
+ },
2163
+ 'shape-image-threshold': {
2164
+ layer: Layer.CoreNative
2165
+ },
2166
+ 'clip-path': {
2167
+ match: /^clip:/,
2168
+ layer: Layer.CoreNative
2169
+ },
2170
+ quotes: {
2171
+ layer: Layer.CoreNative
2172
+ },
2173
+ 'mask-image': {
2174
+ layer: Layer.CoreNative,
2175
+ declare (value) {
2176
+ return {
2177
+ 'mask-image': value,
2178
+ '-webkit-mask-image': value
2179
+ };
2180
+ }
2181
+ }
2182
+ };
2183
+
2184
+ export { BORDER_STYLES, autofillSolidToValueComponent, rules as default };