@master/css 2.0.0-rc.6 → 2.0.0-rc.60

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