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