@master/css 2.0.0-rc.4 → 2.0.0-rc.40

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