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

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 (144) 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 +2300 -0
  27. package/dist/config/rules.d.ts +278 -274
  28. package/dist/config/rules.mjs +2298 -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 +96 -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-node.cjs +18 -0
  64. package/dist/rule-node.d.ts +14 -0
  65. package/dist/rule-node.mjs +16 -0
  66. package/dist/rule.cjs +18 -0
  67. package/dist/rule.d.ts +9 -111
  68. package/dist/rule.mjs +16 -0
  69. package/dist/shared/utils/css-escape.cjs +56 -0
  70. package/dist/shared/utils/css-escape.mjs +54 -0
  71. package/dist/shared/utils/find-native-css-rule-index.cjs +12 -0
  72. package/dist/shared/utils/find-native-css-rule-index.mjs +10 -0
  73. package/dist/syntax-layer.cjs +8 -0
  74. package/dist/syntax-layer.d.ts +18 -0
  75. package/dist/syntax-layer.mjs +6 -0
  76. package/dist/syntax-rule-type.cjs +27 -0
  77. package/dist/syntax-rule-type.d.ts +28 -0
  78. package/dist/syntax-rule-type.mjs +25 -0
  79. package/dist/syntax-rule.cjs +666 -0
  80. package/dist/syntax-rule.d.ts +51 -0
  81. package/dist/syntax-rule.mjs +664 -0
  82. package/dist/types/common.cjs +2 -0
  83. package/dist/types/common.d.ts +1 -0
  84. package/dist/types/common.mjs +1 -0
  85. package/dist/types/config.cjs +2 -0
  86. package/dist/types/config.d.ts +70 -0
  87. package/dist/types/config.mjs +1 -0
  88. package/dist/types/syntax.cjs +2 -0
  89. package/dist/types/syntax.d.ts +106 -0
  90. package/dist/types/syntax.mjs +1 -0
  91. package/dist/utils/are-rule-at-equal.cjs +12 -0
  92. package/dist/utils/are-rule-at-equal.d.ts +2 -0
  93. package/dist/utils/are-rule-at-equal.mjs +10 -0
  94. package/dist/utils/are-rule-modes-equal.cjs +7 -0
  95. package/dist/utils/are-rule-modes-equal.d.ts +2 -0
  96. package/dist/utils/are-rule-modes-equal.mjs +5 -0
  97. package/dist/utils/are-rule-selectors-equal.cjs +29 -0
  98. package/dist/utils/are-rule-selectors-equal.d.ts +2 -0
  99. package/dist/utils/are-rule-selectors-equal.mjs +27 -0
  100. package/dist/utils/are-rule-states-equal.cjs +11 -0
  101. package/dist/utils/are-rule-states-equal.d.ts +2 -0
  102. package/dist/utils/are-rule-states-equal.mjs +9 -0
  103. package/dist/utils/are-rules-duplicated.cjs +17 -0
  104. package/dist/utils/are-rules-duplicated.d.ts +2 -0
  105. package/dist/utils/are-rules-duplicated.mjs +15 -0
  106. package/dist/utils/autofill-solid-style.cjs +31 -0
  107. package/dist/utils/autofill-solid-style.d.ts +3 -0
  108. package/dist/utils/autofill-solid-style.mjs +29 -0
  109. package/dist/utils/extend-config.cjs +59 -0
  110. package/dist/utils/extend-config.d.ts +2 -2
  111. package/dist/utils/extend-config.mjs +57 -0
  112. package/dist/utils/flatten-object.cjs +15 -0
  113. package/dist/utils/flatten-object.d.ts +1 -1
  114. package/dist/utils/flatten-object.mjs +13 -0
  115. package/dist/utils/generate-css.cjs +13 -0
  116. package/dist/utils/generate-css.d.ts +2 -0
  117. package/dist/utils/generate-css.mjs +11 -0
  118. package/dist/utils/hex-to-rgb.cjs +30 -0
  119. package/dist/utils/hex-to-rgb.d.ts +1 -1
  120. package/dist/utils/hex-to-rgb.mjs +28 -0
  121. package/dist/utils/is-core-rule.cjs +9 -0
  122. package/dist/utils/is-core-rule.d.ts +1 -0
  123. package/dist/utils/is-core-rule.mjs +7 -0
  124. package/dist/utils/reorder-for-readable-classes.cjs +62 -0
  125. package/dist/{functions → utils}/reorder-for-readable-classes.d.ts +2 -6
  126. package/dist/utils/reorder-for-readable-classes.mjs +60 -0
  127. package/package.json +1 -1
  128. package/dist/bin/index.bundle.js +0 -36
  129. package/dist/config/media-queries.d.ts +0 -1
  130. package/dist/constants/base-unit-regex.d.ts +0 -1
  131. package/dist/constants/config-esm-text.d.ts +0 -1
  132. package/dist/constants/config-text.d.ts +0 -1
  133. package/dist/constants/config-ts-text.d.ts +0 -1
  134. package/dist/constants/start-symbol.d.ts +0 -6
  135. package/dist/functions/transform-color-with-opacity.d.ts +0 -1
  136. package/dist/index.bundle.js +0 -35
  137. package/dist/index.bundle.mjs +0 -35
  138. package/dist/tokens/screen-sizes.d.ts +0 -14
  139. package/dist/types/global.d.ts +0 -5
  140. package/dist/utils/concat-arrays.d.ts +0 -1
  141. package/dist/utils/get-type.d.ts +0 -7
  142. package/dist/utils/is-plain-object.d.ts +0 -8
  143. package/dist/utils/is-symbol.d.ts +0 -7
  144. package/dist/utils/rgb-to-hex.d.ts +0 -1
@@ -0,0 +1,2298 @@
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
+ },
849
+ 'overflow-y': {
850
+ type: SyntaxRuleType.Native
851
+ },
852
+ overflow: {
853
+ type: SyntaxRuleType.NativeShorthand
854
+ },
855
+ 'overscroll-behavior-x': {
856
+ type: SyntaxRuleType.Native
857
+ },
858
+ 'overscroll-behavior-y': {
859
+ type: SyntaxRuleType.Native
860
+ },
861
+ 'overscroll-behavior': {
862
+ type: SyntaxRuleType.NativeShorthand
863
+ },
864
+ 'z-index': {
865
+ key: 'z',
866
+ type: SyntaxRuleType.Native
867
+ },
868
+ position: {
869
+ type: SyntaxRuleType.Native
870
+ },
871
+ cursor: {
872
+ type: SyntaxRuleType.Native
873
+ },
874
+ 'pointer-events': {
875
+ type: SyntaxRuleType.Native
876
+ },
877
+ resize: {
878
+ type: SyntaxRuleType.Native
879
+ },
880
+ 'touch-action': {
881
+ type: SyntaxRuleType.Native
882
+ },
883
+ 'word-break': {
884
+ type: SyntaxRuleType.Native
885
+ },
886
+ 'word-spacing': {
887
+ type: SyntaxRuleType.Native,
888
+ unit: 'em'
889
+ },
890
+ hyphens: {
891
+ type: SyntaxRuleType.Native
892
+ },
893
+ 'user-drag': {
894
+ type: SyntaxRuleType.Native,
895
+ declare (value) {
896
+ return {
897
+ '-webkit-user-drag': value,
898
+ 'user-drag': value
899
+ };
900
+ }
901
+ },
902
+ 'user-select': {
903
+ type: SyntaxRuleType.Native,
904
+ declare (value) {
905
+ return {
906
+ '-webkit-user-select': value,
907
+ 'user-select': value
908
+ };
909
+ }
910
+ },
911
+ 'text-shadow': {
912
+ unit: 'rem',
913
+ type: SyntaxRuleType.Native
914
+ },
915
+ 'text-size': {
916
+ ambiguousKeys: [
917
+ 'text',
918
+ 't'
919
+ ],
920
+ ambiguousValues: [
921
+ NUMBER_VALUE_REGEX
922
+ ],
923
+ unit: 'rem',
924
+ declare (value) {
925
+ const diff = .875;
926
+ return {
927
+ 'font-size': value,
928
+ 'line-height': `calc(${value} + ${diff}em)`
929
+ };
930
+ },
931
+ type: SyntaxRuleType.Shorthand
932
+ },
933
+ 'text-fill-color': {
934
+ ambiguousKeys: [
935
+ 'text',
936
+ 't'
937
+ ],
938
+ ambiguousValues: [
939
+ COLOR_VALUE_REGEX
940
+ ],
941
+ type: SyntaxRuleType.Native,
942
+ variables: [
943
+ 'text'
944
+ ],
945
+ declare (value) {
946
+ return {
947
+ '-webkit-text-fill-color': value
948
+ };
949
+ }
950
+ },
951
+ 'text-stroke-width': {
952
+ ambiguousKeys: [
953
+ 'text-stroke'
954
+ ],
955
+ ambiguousValues: [
956
+ 'thin',
957
+ 'medium',
958
+ 'thick',
959
+ NUMBER_VALUE_REGEX
960
+ ],
961
+ unit: 'rem',
962
+ type: SyntaxRuleType.Native,
963
+ declare (value) {
964
+ return {
965
+ '-webkit-text-stroke-width': value
966
+ };
967
+ }
968
+ },
969
+ 'text-stroke-color': {
970
+ ambiguousKeys: [
971
+ 'text-stroke'
972
+ ],
973
+ ambiguousValues: [
974
+ COLOR_VALUE_REGEX
975
+ ],
976
+ type: SyntaxRuleType.Native,
977
+ declare (value) {
978
+ return {
979
+ '-webkit-text-stroke-color': value
980
+ };
981
+ }
982
+ },
983
+ 'text-stroke': {
984
+ unit: 'rem',
985
+ type: SyntaxRuleType.Native,
986
+ declare (value) {
987
+ return {
988
+ '-webkit-text-stroke': value
989
+ };
990
+ }
991
+ },
992
+ 'text-truncate': {
993
+ subkey: 'lines',
994
+ declare (value) {
995
+ return {
996
+ display: '-webkit-box',
997
+ '-webkit-box-orient': 'vertical',
998
+ '-webkit-line-clamp': value,
999
+ overflow: 'hidden',
1000
+ 'overflow-wrap': 'break-word',
1001
+ 'text-overflow': 'ellipsis'
1002
+ };
1003
+ },
1004
+ type: SyntaxRuleType.Shorthand
1005
+ },
1006
+ 'box-shadow': {
1007
+ key: 'shadow',
1008
+ subkey: 's',
1009
+ unit: 'rem',
1010
+ type: SyntaxRuleType.Native
1011
+ },
1012
+ 'table-layout': {
1013
+ type: SyntaxRuleType.Native
1014
+ },
1015
+ 'transform-box': {
1016
+ ambiguousKeys: [
1017
+ 'transform'
1018
+ ],
1019
+ type: SyntaxRuleType.Native
1020
+ },
1021
+ 'transform-style': {
1022
+ ambiguousKeys: [
1023
+ 'transform'
1024
+ ],
1025
+ ambiguousValues: [
1026
+ 'flat',
1027
+ 'preserve-3d'
1028
+ ],
1029
+ type: SyntaxRuleType.Native
1030
+ },
1031
+ 'transform-origin': {
1032
+ ambiguousKeys: [
1033
+ 'transform'
1034
+ ],
1035
+ ambiguousValues: [
1036
+ 'top',
1037
+ 'bottom',
1038
+ 'right',
1039
+ 'left',
1040
+ 'center',
1041
+ NUMBER_VALUE_REGEX
1042
+ ],
1043
+ unit: 'px',
1044
+ type: SyntaxRuleType.Native
1045
+ },
1046
+ transform: {
1047
+ matcher: /^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\(/,
1048
+ type: SyntaxRuleType.Native,
1049
+ analyze (className) {
1050
+ return [
1051
+ className.startsWith('transform') ? className.slice(10) : className
1052
+ ];
1053
+ },
1054
+ unit: 'px',
1055
+ variables: [
1056
+ 'spacing'
1057
+ ]
1058
+ },
1059
+ 'transition-property': {
1060
+ key: '~property',
1061
+ type: SyntaxRuleType.Native
1062
+ },
1063
+ 'transition-timing-function': {
1064
+ key: '~easing',
1065
+ type: SyntaxRuleType.Native
1066
+ },
1067
+ 'transition-duration': {
1068
+ key: '~duration',
1069
+ type: SyntaxRuleType.Native,
1070
+ unit: 'ms'
1071
+ },
1072
+ 'transition-delay': {
1073
+ key: '~delay',
1074
+ type: SyntaxRuleType.Native,
1075
+ unit: 'ms'
1076
+ },
1077
+ transition: {
1078
+ sign: '~',
1079
+ analyze (className) {
1080
+ if (className.startsWith('~')) {
1081
+ return [
1082
+ className.slice(1)
1083
+ ];
1084
+ } else {
1085
+ const indexOfColon = className.indexOf(':');
1086
+ this.keyToken = className.slice(0, indexOfColon + 1);
1087
+ return [
1088
+ className.slice(indexOfColon + 1)
1089
+ ];
1090
+ }
1091
+ },
1092
+ type: SyntaxRuleType.NativeShorthand
1093
+ },
1094
+ 'animation-delay': {
1095
+ key: '@delay',
1096
+ type: SyntaxRuleType.Native,
1097
+ unit: 'ms'
1098
+ },
1099
+ 'animation-direction': {
1100
+ key: '@direction',
1101
+ type: SyntaxRuleType.Native
1102
+ },
1103
+ 'animation-duration': {
1104
+ key: '@duration',
1105
+ type: SyntaxRuleType.Native,
1106
+ unit: 'ms'
1107
+ },
1108
+ 'animation-fill-mode': {
1109
+ key: '@fill',
1110
+ type: SyntaxRuleType.Native
1111
+ },
1112
+ 'animation-iteration-count': {
1113
+ key: '@iteration',
1114
+ type: SyntaxRuleType.Native
1115
+ },
1116
+ 'animation-name': {
1117
+ key: '@name',
1118
+ type: SyntaxRuleType.Native,
1119
+ includeAnimations: true
1120
+ },
1121
+ 'animation-play-state': {
1122
+ key: '@play',
1123
+ type: SyntaxRuleType.Native
1124
+ },
1125
+ 'animation-timing-function': {
1126
+ key: '@easing',
1127
+ type: SyntaxRuleType.Native
1128
+ },
1129
+ animation: {
1130
+ sign: '@',
1131
+ type: SyntaxRuleType.NativeShorthand,
1132
+ includeAnimations: true,
1133
+ analyze (className) {
1134
+ if (className.startsWith('@')) {
1135
+ return [
1136
+ className.slice(1)
1137
+ ];
1138
+ } else {
1139
+ const indexOfColon = className.indexOf(':');
1140
+ this.keyToken = className.slice(0, indexOfColon + 1);
1141
+ return [
1142
+ className.slice(indexOfColon + 1)
1143
+ ];
1144
+ }
1145
+ }
1146
+ },
1147
+ 'border-collapse': {
1148
+ ambiguousKeys: [
1149
+ 'b',
1150
+ 'border'
1151
+ ],
1152
+ ambiguousValues: [
1153
+ 'collapse',
1154
+ 'separate'
1155
+ ],
1156
+ type: SyntaxRuleType.Native
1157
+ },
1158
+ 'border-spacing': {
1159
+ unit: 'rem',
1160
+ type: SyntaxRuleType.Native,
1161
+ variables: [
1162
+ 'spacing'
1163
+ ]
1164
+ },
1165
+ // border color
1166
+ 'border-top-color': {
1167
+ ambiguousKeys: [
1168
+ 'bt',
1169
+ 'border-top'
1170
+ ],
1171
+ ambiguousValues: [
1172
+ COLOR_VALUE_REGEX
1173
+ ],
1174
+ type: SyntaxRuleType.Native,
1175
+ variables: [
1176
+ 'frame'
1177
+ ]
1178
+ },
1179
+ 'border-bottom-color': {
1180
+ ambiguousKeys: [
1181
+ 'bb',
1182
+ 'border-bottom'
1183
+ ],
1184
+ ambiguousValues: [
1185
+ COLOR_VALUE_REGEX
1186
+ ],
1187
+ type: SyntaxRuleType.Native,
1188
+ variables: [
1189
+ 'frame'
1190
+ ]
1191
+ },
1192
+ 'border-left-color': {
1193
+ ambiguousKeys: [
1194
+ 'bl',
1195
+ 'border-left'
1196
+ ],
1197
+ ambiguousValues: [
1198
+ COLOR_VALUE_REGEX
1199
+ ],
1200
+ type: SyntaxRuleType.Native,
1201
+ variables: [
1202
+ 'frame'
1203
+ ]
1204
+ },
1205
+ 'border-right-color': {
1206
+ ambiguousKeys: [
1207
+ 'br',
1208
+ 'border-right'
1209
+ ],
1210
+ ambiguousValues: [
1211
+ COLOR_VALUE_REGEX
1212
+ ],
1213
+ type: SyntaxRuleType.Native,
1214
+ variables: [
1215
+ 'frame'
1216
+ ]
1217
+ },
1218
+ 'border-x-color': {
1219
+ ambiguousKeys: [
1220
+ 'bx',
1221
+ 'border-x'
1222
+ ],
1223
+ ambiguousValues: [
1224
+ COLOR_VALUE_REGEX
1225
+ ],
1226
+ type: SyntaxRuleType.Shorthand,
1227
+ variables: [
1228
+ 'frame'
1229
+ ],
1230
+ declare (value) {
1231
+ return {
1232
+ 'border-left-color': value,
1233
+ 'border-right-color': value
1234
+ };
1235
+ }
1236
+ },
1237
+ 'border-y-color': {
1238
+ ambiguousKeys: [
1239
+ 'by',
1240
+ 'border-y'
1241
+ ],
1242
+ ambiguousValues: [
1243
+ COLOR_VALUE_REGEX
1244
+ ],
1245
+ type: SyntaxRuleType.Shorthand,
1246
+ variables: [
1247
+ 'frame'
1248
+ ],
1249
+ declare (value) {
1250
+ return {
1251
+ 'border-top-color': value,
1252
+ 'border-bottom-color': value
1253
+ };
1254
+ }
1255
+ },
1256
+ 'border-color': {
1257
+ ambiguousKeys: [
1258
+ 'b',
1259
+ 'border'
1260
+ ],
1261
+ ambiguousValues: [
1262
+ COLOR_VALUE_REGEX
1263
+ ],
1264
+ type: SyntaxRuleType.NativeShorthand,
1265
+ variables: [
1266
+ 'frame'
1267
+ ]
1268
+ },
1269
+ // border radius
1270
+ 'border-top-left-radius': {
1271
+ key: 'rtl',
1272
+ unit: 'rem',
1273
+ type: SyntaxRuleType.Native
1274
+ },
1275
+ 'border-top-right-radius': {
1276
+ key: 'rtr',
1277
+ unit: 'rem',
1278
+ type: SyntaxRuleType.Native
1279
+ },
1280
+ 'border-bottom-left-radius': {
1281
+ key: 'rbl',
1282
+ unit: 'rem',
1283
+ type: SyntaxRuleType.Native
1284
+ },
1285
+ 'border-bottom-right-radius': {
1286
+ key: 'rbr',
1287
+ unit: 'rem',
1288
+ type: SyntaxRuleType.Native
1289
+ },
1290
+ 'border-top-radius': {
1291
+ key: 'rt',
1292
+ unit: 'rem',
1293
+ type: SyntaxRuleType.Shorthand,
1294
+ declare (value) {
1295
+ return {
1296
+ 'border-top-left-radius': value,
1297
+ 'border-top-right-radius': value
1298
+ };
1299
+ }
1300
+ },
1301
+ 'border-bottom-radius': {
1302
+ key: 'rb',
1303
+ unit: 'rem',
1304
+ type: SyntaxRuleType.Shorthand,
1305
+ declare (value) {
1306
+ return {
1307
+ 'border-bottom-left-radius': value,
1308
+ 'border-bottom-right-radius': value
1309
+ };
1310
+ }
1311
+ },
1312
+ 'border-left-radius': {
1313
+ key: 'rl',
1314
+ unit: 'rem',
1315
+ type: SyntaxRuleType.Shorthand,
1316
+ declare (value) {
1317
+ return {
1318
+ 'border-top-left-radius': value,
1319
+ 'border-bottom-left-radius': value
1320
+ };
1321
+ }
1322
+ },
1323
+ 'border-right-radius': {
1324
+ key: 'rr',
1325
+ unit: 'rem',
1326
+ type: SyntaxRuleType.Shorthand,
1327
+ declare (value) {
1328
+ return {
1329
+ 'border-top-right-radius': value,
1330
+ 'border-bottom-right-radius': value
1331
+ };
1332
+ }
1333
+ },
1334
+ 'border-radius': {
1335
+ key: 'r',
1336
+ unit: 'rem',
1337
+ type: SyntaxRuleType.NativeShorthand
1338
+ },
1339
+ // border style
1340
+ 'border-top-style': {
1341
+ ambiguousKeys: [
1342
+ 'bt',
1343
+ 'border-top'
1344
+ ],
1345
+ ambiguousValues: BORDER_STYLE_VALUES,
1346
+ type: SyntaxRuleType.Native
1347
+ },
1348
+ 'border-bottom-style': {
1349
+ ambiguousKeys: [
1350
+ 'bb',
1351
+ 'border-bottom'
1352
+ ],
1353
+ ambiguousValues: BORDER_STYLE_VALUES,
1354
+ type: SyntaxRuleType.Native
1355
+ },
1356
+ 'border-left-style': {
1357
+ ambiguousKeys: [
1358
+ 'bl',
1359
+ 'border-left'
1360
+ ],
1361
+ ambiguousValues: BORDER_STYLE_VALUES,
1362
+ type: SyntaxRuleType.Native
1363
+ },
1364
+ 'border-right-style': {
1365
+ ambiguousKeys: [
1366
+ 'br',
1367
+ 'border-right'
1368
+ ],
1369
+ ambiguousValues: BORDER_STYLE_VALUES,
1370
+ type: SyntaxRuleType.Native
1371
+ },
1372
+ 'border-x-style': {
1373
+ ambiguousKeys: [
1374
+ 'bx',
1375
+ 'border-x'
1376
+ ],
1377
+ ambiguousValues: BORDER_STYLE_VALUES,
1378
+ type: SyntaxRuleType.Shorthand,
1379
+ declare (value) {
1380
+ return {
1381
+ 'border-left-style': value,
1382
+ 'border-right-style': value
1383
+ };
1384
+ }
1385
+ },
1386
+ 'border-y-style': {
1387
+ ambiguousKeys: [
1388
+ 'by',
1389
+ 'border-y'
1390
+ ],
1391
+ ambiguousValues: BORDER_STYLE_VALUES,
1392
+ type: SyntaxRuleType.Shorthand,
1393
+ declare (value) {
1394
+ return {
1395
+ 'border-top-style': value,
1396
+ 'border-bottom-style': value
1397
+ };
1398
+ }
1399
+ },
1400
+ 'border-style': {
1401
+ ambiguousKeys: [
1402
+ 'b',
1403
+ 'border'
1404
+ ],
1405
+ ambiguousValues: BORDER_STYLE_VALUES,
1406
+ type: SyntaxRuleType.NativeShorthand
1407
+ },
1408
+ // border width
1409
+ 'border-top-width': {
1410
+ ambiguousKeys: [
1411
+ 'bt',
1412
+ 'border-top'
1413
+ ],
1414
+ ambiguousValues: [
1415
+ NUMBER_VALUE_REGEX
1416
+ ],
1417
+ unit: 'rem',
1418
+ type: SyntaxRuleType.Native
1419
+ },
1420
+ 'border-bottom-width': {
1421
+ ambiguousKeys: [
1422
+ 'bb',
1423
+ 'border-bottom'
1424
+ ],
1425
+ ambiguousValues: [
1426
+ NUMBER_VALUE_REGEX
1427
+ ],
1428
+ unit: 'rem',
1429
+ type: SyntaxRuleType.Native
1430
+ },
1431
+ 'border-left-width': {
1432
+ ambiguousKeys: [
1433
+ 'bl',
1434
+ 'border-left'
1435
+ ],
1436
+ ambiguousValues: [
1437
+ NUMBER_VALUE_REGEX
1438
+ ],
1439
+ unit: 'rem',
1440
+ type: SyntaxRuleType.Native
1441
+ },
1442
+ 'border-right-width': {
1443
+ ambiguousKeys: [
1444
+ 'br',
1445
+ 'border-right'
1446
+ ],
1447
+ ambiguousValues: [
1448
+ NUMBER_VALUE_REGEX
1449
+ ],
1450
+ unit: 'rem',
1451
+ type: SyntaxRuleType.Native
1452
+ },
1453
+ 'border-x-width': {
1454
+ ambiguousKeys: [
1455
+ 'bx',
1456
+ 'border-x'
1457
+ ],
1458
+ ambiguousValues: [
1459
+ NUMBER_VALUE_REGEX
1460
+ ],
1461
+ unit: 'rem',
1462
+ type: SyntaxRuleType.Shorthand,
1463
+ declare (value) {
1464
+ return {
1465
+ 'border-left-width': value,
1466
+ 'border-right-width': value
1467
+ };
1468
+ }
1469
+ },
1470
+ 'border-y-width': {
1471
+ ambiguousKeys: [
1472
+ 'by',
1473
+ 'border-y'
1474
+ ],
1475
+ ambiguousValues: [
1476
+ NUMBER_VALUE_REGEX
1477
+ ],
1478
+ unit: 'rem',
1479
+ type: SyntaxRuleType.Shorthand,
1480
+ declare (value) {
1481
+ return {
1482
+ 'border-top-width': value,
1483
+ 'border-bottom-width': value
1484
+ };
1485
+ }
1486
+ },
1487
+ 'border-width': {
1488
+ ambiguousKeys: [
1489
+ 'b',
1490
+ 'border'
1491
+ ],
1492
+ ambiguousValues: [
1493
+ NUMBER_VALUE_REGEX
1494
+ ],
1495
+ unit: 'rem',
1496
+ type: SyntaxRuleType.NativeShorthand
1497
+ },
1498
+ // border image
1499
+ 'border-image-repeat': {
1500
+ ambiguousKeys: [
1501
+ 'border-image'
1502
+ ],
1503
+ ambiguousValues: [
1504
+ 'stretch',
1505
+ 'repeat',
1506
+ 'round',
1507
+ 'space'
1508
+ ],
1509
+ type: SyntaxRuleType.Native
1510
+ },
1511
+ 'border-image-slice': {
1512
+ ambiguousKeys: [
1513
+ 'border-image'
1514
+ ],
1515
+ type: SyntaxRuleType.Native
1516
+ },
1517
+ 'border-image-source': {
1518
+ ambiguousKeys: [
1519
+ 'border-image'
1520
+ ],
1521
+ ambiguousValues: [
1522
+ IMAGE_VALUE_REGEX
1523
+ ],
1524
+ type: SyntaxRuleType.Native
1525
+ },
1526
+ 'border-image-width': {
1527
+ ambiguousKeys: [
1528
+ 'border-image'
1529
+ ],
1530
+ ambiguousValues: [
1531
+ 'auto',
1532
+ NUMBER_VALUE_REGEX
1533
+ ],
1534
+ unit: 'rem',
1535
+ type: SyntaxRuleType.Native
1536
+ },
1537
+ 'border-image-outset': {
1538
+ ambiguousKeys: [
1539
+ 'border-image'
1540
+ ],
1541
+ ambiguousValues: [
1542
+ NUMBER_VALUE_REGEX
1543
+ ],
1544
+ unit: 'rem',
1545
+ type: SyntaxRuleType.Native
1546
+ },
1547
+ 'border-image': {
1548
+ type: SyntaxRuleType.NativeShorthand
1549
+ },
1550
+ // border
1551
+ 'border-top': {
1552
+ key: 'bt',
1553
+ type: SyntaxRuleType.NativeShorthand,
1554
+ unit: 'rem',
1555
+ transformValueComponents: autofillSolidStyle,
1556
+ variables: [
1557
+ 'frame'
1558
+ ]
1559
+ },
1560
+ 'border-bottom': {
1561
+ key: 'bb',
1562
+ type: SyntaxRuleType.NativeShorthand,
1563
+ unit: 'rem',
1564
+ transformValueComponents: autofillSolidStyle,
1565
+ variables: [
1566
+ 'frame'
1567
+ ]
1568
+ },
1569
+ 'border-left': {
1570
+ key: 'bl',
1571
+ type: SyntaxRuleType.NativeShorthand,
1572
+ unit: 'rem',
1573
+ transformValueComponents: autofillSolidStyle,
1574
+ variables: [
1575
+ 'frame'
1576
+ ]
1577
+ },
1578
+ 'border-right': {
1579
+ key: 'br',
1580
+ type: SyntaxRuleType.NativeShorthand,
1581
+ unit: 'rem',
1582
+ transformValueComponents: autofillSolidStyle,
1583
+ variables: [
1584
+ 'frame'
1585
+ ]
1586
+ },
1587
+ 'border-x': {
1588
+ key: 'bx',
1589
+ unit: 'rem',
1590
+ type: SyntaxRuleType.Shorthand,
1591
+ transformValueComponents: autofillSolidStyle,
1592
+ variables: [
1593
+ 'frame'
1594
+ ],
1595
+ declare (value) {
1596
+ return {
1597
+ 'border-left': value,
1598
+ 'border-right': value
1599
+ };
1600
+ }
1601
+ },
1602
+ 'border-y': {
1603
+ key: 'by',
1604
+ unit: 'rem',
1605
+ type: SyntaxRuleType.Shorthand,
1606
+ transformValueComponents: autofillSolidStyle,
1607
+ variables: [
1608
+ 'frame'
1609
+ ],
1610
+ declare (value) {
1611
+ return {
1612
+ 'border-top': value,
1613
+ 'border-bottom': value
1614
+ };
1615
+ }
1616
+ },
1617
+ border: {
1618
+ key: 'b',
1619
+ unit: 'rem',
1620
+ type: SyntaxRuleType.NativeShorthand,
1621
+ transformValueComponents: autofillSolidStyle,
1622
+ variables: [
1623
+ 'frame'
1624
+ ]
1625
+ },
1626
+ 'background-attachment': {
1627
+ ambiguousKeys: [
1628
+ 'bg'
1629
+ ],
1630
+ ambiguousValues: [
1631
+ 'fixed',
1632
+ 'local',
1633
+ 'scroll'
1634
+ ],
1635
+ type: SyntaxRuleType.Native
1636
+ },
1637
+ 'background-blend-mode': {
1638
+ key: 'bg-blend',
1639
+ type: SyntaxRuleType.Native
1640
+ },
1641
+ 'background-color': {
1642
+ ambiguousKeys: [
1643
+ 'bg'
1644
+ ],
1645
+ ambiguousValues: [
1646
+ COLOR_VALUE_REGEX
1647
+ ],
1648
+ type: SyntaxRuleType.Native
1649
+ },
1650
+ 'background-clip': {
1651
+ key: 'bg-clip',
1652
+ type: SyntaxRuleType.Native,
1653
+ declare (value) {
1654
+ return {
1655
+ '-webkit-background-clip': value,
1656
+ 'background-clip': value
1657
+ };
1658
+ }
1659
+ },
1660
+ 'background-origin': {
1661
+ key: 'bg-origin',
1662
+ type: SyntaxRuleType.Native
1663
+ },
1664
+ 'background-position': {
1665
+ ambiguousKeys: [
1666
+ 'bg'
1667
+ ],
1668
+ ambiguousValues: [
1669
+ 'top',
1670
+ 'bottom',
1671
+ 'right',
1672
+ 'left',
1673
+ 'center'
1674
+ ],
1675
+ type: SyntaxRuleType.Native,
1676
+ unit: 'px'
1677
+ },
1678
+ 'background-repeat': {
1679
+ ambiguousKeys: [
1680
+ 'bg'
1681
+ ],
1682
+ ambiguousValues: [
1683
+ 'space',
1684
+ 'round',
1685
+ 'repeat',
1686
+ 'no-repeat',
1687
+ 'repeat-x',
1688
+ 'repeat-y'
1689
+ ],
1690
+ type: SyntaxRuleType.Native
1691
+ },
1692
+ 'background-size': {
1693
+ ambiguousKeys: [
1694
+ 'bg'
1695
+ ],
1696
+ ambiguousValues: [
1697
+ 'auto',
1698
+ 'cover',
1699
+ 'contain',
1700
+ NUMBER_VALUE_REGEX
1701
+ ],
1702
+ unit: 'rem',
1703
+ type: SyntaxRuleType.Native
1704
+ },
1705
+ 'background-image': {
1706
+ ambiguousKeys: [
1707
+ 'bg'
1708
+ ],
1709
+ ambiguousValues: [
1710
+ IMAGE_VALUE_REGEX
1711
+ ],
1712
+ type: SyntaxRuleType.Native
1713
+ },
1714
+ background: {
1715
+ key: 'bg',
1716
+ type: SyntaxRuleType.NativeShorthand
1717
+ },
1718
+ gradient: {
1719
+ matcher: /^gradient\(/,
1720
+ type: SyntaxRuleType.Shorthand,
1721
+ declare (value) {
1722
+ return {
1723
+ 'background-image': 'linear-' + value
1724
+ };
1725
+ }
1726
+ },
1727
+ 'mix-blend-mode': {
1728
+ key: 'blend',
1729
+ type: SyntaxRuleType.Native
1730
+ },
1731
+ 'backdrop-filter': {
1732
+ key: 'bd',
1733
+ type: SyntaxRuleType.Native,
1734
+ declare (value) {
1735
+ return {
1736
+ '-webkit-backdrop-filter': value,
1737
+ 'backdrop-filter': value
1738
+ };
1739
+ }
1740
+ },
1741
+ filter: {
1742
+ matcher: /^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\(/,
1743
+ type: SyntaxRuleType.Native
1744
+ },
1745
+ fill: {
1746
+ type: SyntaxRuleType.Native
1747
+ },
1748
+ 'stroke-dasharray': {
1749
+ type: SyntaxRuleType.Native
1750
+ },
1751
+ 'stroke-dashoffset': {
1752
+ type: SyntaxRuleType.Native,
1753
+ variables: [
1754
+ 'spacing'
1755
+ ]
1756
+ },
1757
+ 'stroke-width': {
1758
+ ambiguousKeys: [
1759
+ 'stroke'
1760
+ ],
1761
+ ambiguousValues: [
1762
+ NUMBER_VALUE_REGEX
1763
+ ],
1764
+ type: SyntaxRuleType.Native
1765
+ },
1766
+ stroke: {
1767
+ type: SyntaxRuleType.Native
1768
+ },
1769
+ x: {
1770
+ type: SyntaxRuleType.Native,
1771
+ variables: [
1772
+ 'spacing'
1773
+ ]
1774
+ },
1775
+ y: {
1776
+ type: SyntaxRuleType.Native,
1777
+ variables: [
1778
+ 'spacing'
1779
+ ]
1780
+ },
1781
+ cx: {
1782
+ type: SyntaxRuleType.Native,
1783
+ variables: [
1784
+ 'spacing'
1785
+ ]
1786
+ },
1787
+ cy: {
1788
+ type: SyntaxRuleType.Native,
1789
+ variables: [
1790
+ 'spacing'
1791
+ ]
1792
+ },
1793
+ rx: {
1794
+ type: SyntaxRuleType.Native
1795
+ },
1796
+ ry: {
1797
+ type: SyntaxRuleType.Native
1798
+ },
1799
+ 'grid-column-start': {
1800
+ key: 'grid-col-start',
1801
+ type: SyntaxRuleType.Native
1802
+ },
1803
+ 'grid-column-end': {
1804
+ key: 'grid-col-end',
1805
+ type: SyntaxRuleType.Native
1806
+ },
1807
+ 'grid-column-span': {
1808
+ key: 'grid-col-span',
1809
+ type: SyntaxRuleType.Shorthand,
1810
+ transformValue (value) {
1811
+ return 'span' + ' ' + value + '/' + 'span' + ' ' + value;
1812
+ },
1813
+ declare (value) {
1814
+ return {
1815
+ 'grid-column': value
1816
+ };
1817
+ }
1818
+ },
1819
+ 'grid-column': {
1820
+ key: 'grid-col',
1821
+ type: SyntaxRuleType.NativeShorthand
1822
+ },
1823
+ 'grid-columns': {
1824
+ key: 'grid-cols',
1825
+ declare (value) {
1826
+ return {
1827
+ display: 'grid',
1828
+ 'grid-template-columns': 'repeat' + '(' + value + ',' + 'minmax' + '(' + 0 + ',' + 1 + 'fr' + '))'
1829
+ };
1830
+ },
1831
+ type: SyntaxRuleType.Shorthand
1832
+ },
1833
+ 'grid-row-start': {
1834
+ type: SyntaxRuleType.Native
1835
+ },
1836
+ 'grid-row-end': {
1837
+ type: SyntaxRuleType.Native
1838
+ },
1839
+ 'grid-row-span': {
1840
+ type: SyntaxRuleType.Shorthand,
1841
+ transformValue (value) {
1842
+ return 'span' + ' ' + value + '/' + 'span' + ' ' + value;
1843
+ },
1844
+ declare (value) {
1845
+ return {
1846
+ 'grid-row': value
1847
+ };
1848
+ }
1849
+ },
1850
+ 'grid-row': {
1851
+ type: SyntaxRuleType.NativeShorthand
1852
+ },
1853
+ 'grid-rows': {
1854
+ declare (value) {
1855
+ return {
1856
+ display: 'grid',
1857
+ 'grid-auto-flow': 'column',
1858
+ 'grid-template-rows': 'repeat' + '(' + value + ',' + 'minmax' + '(' + 0 + ',' + 1 + 'fr' + '))'
1859
+ };
1860
+ },
1861
+ type: SyntaxRuleType.Shorthand
1862
+ },
1863
+ 'grid-auto-columns': {
1864
+ key: 'grid-auto-cols',
1865
+ type: SyntaxRuleType.Native
1866
+ },
1867
+ 'grid-auto-flow': {
1868
+ key: 'grid-flow',
1869
+ type: SyntaxRuleType.Native
1870
+ },
1871
+ 'grid-auto-rows': {
1872
+ type: SyntaxRuleType.Native
1873
+ },
1874
+ 'grid-template-areas': {
1875
+ type: SyntaxRuleType.Native
1876
+ },
1877
+ 'grid-template-columns': {
1878
+ key: 'grid-template-cols',
1879
+ type: SyntaxRuleType.Native,
1880
+ unit: 'rem'
1881
+ },
1882
+ 'grid-template-rows': {
1883
+ type: SyntaxRuleType.Native,
1884
+ unit: 'rem'
1885
+ },
1886
+ 'grid-template': {
1887
+ type: SyntaxRuleType.NativeShorthand
1888
+ },
1889
+ 'grid-area': {
1890
+ type: SyntaxRuleType.NativeShorthand
1891
+ },
1892
+ grid: {
1893
+ type: SyntaxRuleType.NativeShorthand
1894
+ },
1895
+ 'column-gap': {
1896
+ key: 'gap-x',
1897
+ unit: 'rem',
1898
+ type: SyntaxRuleType.Native,
1899
+ variables: [
1900
+ 'spacing'
1901
+ ]
1902
+ },
1903
+ 'row-gap': {
1904
+ key: 'gap-y',
1905
+ unit: 'rem',
1906
+ type: SyntaxRuleType.Native,
1907
+ variables: [
1908
+ 'spacing'
1909
+ ]
1910
+ },
1911
+ gap: {
1912
+ unit: 'rem',
1913
+ type: SyntaxRuleType.NativeShorthand,
1914
+ variables: [
1915
+ 'spacing'
1916
+ ]
1917
+ },
1918
+ order: {
1919
+ key: 'o',
1920
+ type: SyntaxRuleType.Native
1921
+ },
1922
+ 'break-inside': {
1923
+ type: SyntaxRuleType.Native
1924
+ },
1925
+ 'break-before': {
1926
+ type: SyntaxRuleType.Native
1927
+ },
1928
+ 'break-after': {
1929
+ type: SyntaxRuleType.Native
1930
+ },
1931
+ 'aspect-ratio': {
1932
+ key: 'aspect',
1933
+ type: SyntaxRuleType.Native
1934
+ },
1935
+ 'column-span': {
1936
+ key: 'col-span',
1937
+ type: SyntaxRuleType.Native
1938
+ },
1939
+ 'align-content': {
1940
+ subkey: 'ac',
1941
+ type: SyntaxRuleType.Native
1942
+ },
1943
+ 'align-items': {
1944
+ subkey: 'ai',
1945
+ type: SyntaxRuleType.Native
1946
+ },
1947
+ 'align-self': {
1948
+ subkey: 'as',
1949
+ type: SyntaxRuleType.Native
1950
+ },
1951
+ 'justify-content': {
1952
+ subkey: 'jc',
1953
+ type: SyntaxRuleType.Native
1954
+ },
1955
+ 'justify-items': {
1956
+ subkey: 'ji',
1957
+ type: SyntaxRuleType.Native
1958
+ },
1959
+ 'justify-self': {
1960
+ subkey: 'js',
1961
+ type: SyntaxRuleType.Native
1962
+ },
1963
+ 'place-content': {
1964
+ type: SyntaxRuleType.NativeShorthand
1965
+ },
1966
+ 'place-items': {
1967
+ type: SyntaxRuleType.NativeShorthand
1968
+ },
1969
+ 'place-self': {
1970
+ type: SyntaxRuleType.NativeShorthand
1971
+ },
1972
+ 'list-style-position': {
1973
+ ambiguousKeys: [
1974
+ 'list-style'
1975
+ ],
1976
+ ambiguousValues: [
1977
+ 'inside',
1978
+ 'outside'
1979
+ ],
1980
+ type: SyntaxRuleType.Native
1981
+ },
1982
+ 'list-style-type': {
1983
+ ambiguousKeys: [
1984
+ 'list-style'
1985
+ ],
1986
+ ambiguousValues: [
1987
+ 'disc',
1988
+ 'decimal'
1989
+ ],
1990
+ type: SyntaxRuleType.Native
1991
+ },
1992
+ 'list-style-image': {
1993
+ ambiguousKeys: [
1994
+ 'list-style'
1995
+ ],
1996
+ ambiguousValues: [
1997
+ IMAGE_VALUE_REGEX
1998
+ ],
1999
+ type: SyntaxRuleType.Native
2000
+ },
2001
+ 'list-style': {
2002
+ type: SyntaxRuleType.NativeShorthand
2003
+ },
2004
+ 'outline-color': {
2005
+ ambiguousKeys: [
2006
+ 'outline'
2007
+ ],
2008
+ ambiguousValues: [
2009
+ COLOR_VALUE_REGEX
2010
+ ],
2011
+ type: SyntaxRuleType.Native,
2012
+ variables: [
2013
+ 'frame'
2014
+ ]
2015
+ },
2016
+ 'outline-offset': {
2017
+ unit: 'rem',
2018
+ type: SyntaxRuleType.Native,
2019
+ variables: [
2020
+ 'spacing'
2021
+ ]
2022
+ },
2023
+ 'outline-style': {
2024
+ ambiguousKeys: [
2025
+ 'outline'
2026
+ ],
2027
+ ambiguousValues: BORDER_STYLE_VALUES,
2028
+ type: SyntaxRuleType.Native
2029
+ },
2030
+ 'outline-width': {
2031
+ ambiguousKeys: [
2032
+ 'outline'
2033
+ ],
2034
+ ambiguousValues: [
2035
+ 'medium',
2036
+ 'thick',
2037
+ 'thin',
2038
+ NUMBER_VALUE_REGEX
2039
+ ],
2040
+ unit: 'rem',
2041
+ type: SyntaxRuleType.Native
2042
+ },
2043
+ outline: {
2044
+ unit: 'rem',
2045
+ type: SyntaxRuleType.NativeShorthand,
2046
+ variables: [
2047
+ 'outline-width',
2048
+ 'outline-style',
2049
+ 'outline-offset',
2050
+ 'outline-color',
2051
+ 'frame'
2052
+ ],
2053
+ transformValueComponents: autofillSolidStyle
2054
+ },
2055
+ 'accent-color': {
2056
+ key: 'accent',
2057
+ type: SyntaxRuleType.Native
2058
+ },
2059
+ appearance: {
2060
+ type: SyntaxRuleType.Native
2061
+ },
2062
+ 'caret-color': {
2063
+ key: 'caret',
2064
+ type: SyntaxRuleType.Native,
2065
+ variables: [
2066
+ 'text'
2067
+ ]
2068
+ },
2069
+ 'scroll-behavior': {
2070
+ type: SyntaxRuleType.Native
2071
+ },
2072
+ // scroll margin
2073
+ 'scroll-margin-left': {
2074
+ key: 'scroll-ml',
2075
+ type: SyntaxRuleType.Native,
2076
+ unit: 'rem',
2077
+ variables: [
2078
+ 'spacing'
2079
+ ]
2080
+ },
2081
+ 'scroll-margin-right': {
2082
+ key: 'scroll-mr',
2083
+ type: SyntaxRuleType.Native,
2084
+ unit: 'rem',
2085
+ variables: [
2086
+ 'spacing'
2087
+ ]
2088
+ },
2089
+ 'scroll-margin-top': {
2090
+ key: 'scroll-mt',
2091
+ type: SyntaxRuleType.Native,
2092
+ unit: 'rem',
2093
+ variables: [
2094
+ 'spacing'
2095
+ ]
2096
+ },
2097
+ 'scroll-margin-bottom': {
2098
+ key: 'scroll-mb',
2099
+ type: SyntaxRuleType.Native,
2100
+ unit: 'rem',
2101
+ variables: [
2102
+ 'spacing'
2103
+ ]
2104
+ },
2105
+ 'scroll-margin-x': {
2106
+ key: 'scroll-mx',
2107
+ unit: 'rem',
2108
+ type: SyntaxRuleType.Shorthand,
2109
+ declare (value) {
2110
+ return {
2111
+ 'scroll-margin-left': value,
2112
+ 'scroll-margin-right': value
2113
+ };
2114
+ },
2115
+ variables: [
2116
+ 'spacing'
2117
+ ]
2118
+ },
2119
+ 'scroll-margin-y': {
2120
+ key: 'scroll-my',
2121
+ unit: 'rem',
2122
+ type: SyntaxRuleType.Shorthand,
2123
+ declare (value) {
2124
+ return {
2125
+ 'scroll-margin-top': value,
2126
+ 'scroll-margin-bottom': value
2127
+ };
2128
+ },
2129
+ variables: [
2130
+ 'spacing'
2131
+ ]
2132
+ },
2133
+ 'scroll-margin': {
2134
+ key: 'scroll-m',
2135
+ unit: 'rem',
2136
+ type: SyntaxRuleType.NativeShorthand,
2137
+ variables: [
2138
+ 'spacing'
2139
+ ]
2140
+ },
2141
+ // scroll padding
2142
+ 'scroll-padding-left': {
2143
+ key: 'scroll-pl',
2144
+ type: SyntaxRuleType.Native,
2145
+ unit: 'rem',
2146
+ variables: [
2147
+ 'spacing'
2148
+ ]
2149
+ },
2150
+ 'scroll-padding-right': {
2151
+ key: 'scroll-pr',
2152
+ type: SyntaxRuleType.Native,
2153
+ unit: 'rem',
2154
+ variables: [
2155
+ 'spacing'
2156
+ ]
2157
+ },
2158
+ 'scroll-padding-top': {
2159
+ key: 'scroll-pt',
2160
+ type: SyntaxRuleType.Native,
2161
+ unit: 'rem',
2162
+ variables: [
2163
+ 'spacing'
2164
+ ]
2165
+ },
2166
+ 'scroll-padding-bottom': {
2167
+ key: 'scroll-pb',
2168
+ type: SyntaxRuleType.Native,
2169
+ unit: 'rem',
2170
+ variables: [
2171
+ 'spacing'
2172
+ ]
2173
+ },
2174
+ 'scroll-padding-x': {
2175
+ key: 'scroll-px',
2176
+ unit: 'rem',
2177
+ type: SyntaxRuleType.Shorthand,
2178
+ declare (value) {
2179
+ return {
2180
+ 'scroll-padding-left': value,
2181
+ 'scroll-padding-right': value
2182
+ };
2183
+ },
2184
+ variables: [
2185
+ 'spacing'
2186
+ ]
2187
+ },
2188
+ 'scroll-padding-y': {
2189
+ key: 'scroll-py',
2190
+ unit: 'rem',
2191
+ type: SyntaxRuleType.Shorthand,
2192
+ declare (value) {
2193
+ return {
2194
+ 'scroll-padding-top': value,
2195
+ 'scroll-padding-bottom': value
2196
+ };
2197
+ },
2198
+ variables: [
2199
+ 'spacing'
2200
+ ]
2201
+ },
2202
+ 'scroll-padding': {
2203
+ key: 'scroll-p',
2204
+ unit: 'rem',
2205
+ type: SyntaxRuleType.NativeShorthand,
2206
+ variables: [
2207
+ 'spacing'
2208
+ ]
2209
+ },
2210
+ // scroll snap
2211
+ 'scroll-snap-align': {
2212
+ ambiguousKeys: [
2213
+ 'scroll-snap'
2214
+ ],
2215
+ ambiguousValues: [
2216
+ 'start',
2217
+ 'end',
2218
+ 'center'
2219
+ ],
2220
+ type: SyntaxRuleType.Native
2221
+ },
2222
+ 'scroll-snap-stop': {
2223
+ ambiguousKeys: [
2224
+ 'scroll-snap'
2225
+ ],
2226
+ ambiguousValues: [
2227
+ 'normal',
2228
+ 'always'
2229
+ ],
2230
+ type: SyntaxRuleType.Native
2231
+ },
2232
+ 'scroll-snap-type': {
2233
+ ambiguousKeys: [
2234
+ 'scroll-snap'
2235
+ ],
2236
+ ambiguousValues: [
2237
+ 'x',
2238
+ 'y',
2239
+ 'block',
2240
+ 'inline',
2241
+ 'both'
2242
+ ],
2243
+ type: SyntaxRuleType.Native
2244
+ },
2245
+ 'will-change': {
2246
+ type: SyntaxRuleType.Native
2247
+ },
2248
+ 'writing-mode': {
2249
+ key: 'writing',
2250
+ type: SyntaxRuleType.Native
2251
+ },
2252
+ direction: {
2253
+ type: SyntaxRuleType.Native
2254
+ },
2255
+ 'shape-outside': {
2256
+ ambiguousKeys: [
2257
+ 'shape'
2258
+ ],
2259
+ ambiguousValues: [
2260
+ /(?:inset|circle|ellipse|polygon|url|linear-gradient)\(.*\)/
2261
+ ],
2262
+ type: SyntaxRuleType.Native
2263
+ },
2264
+ 'shape-margin': {
2265
+ ambiguousKeys: [
2266
+ 'shape'
2267
+ ],
2268
+ ambiguousValues: [
2269
+ NUMBER_VALUE_REGEX
2270
+ ],
2271
+ unit: 'rem',
2272
+ type: SyntaxRuleType.Native,
2273
+ variables: [
2274
+ 'spacing'
2275
+ ]
2276
+ },
2277
+ 'shape-image-threshold': {
2278
+ type: SyntaxRuleType.Native
2279
+ },
2280
+ 'clip-path': {
2281
+ key: 'clip',
2282
+ type: SyntaxRuleType.Native
2283
+ },
2284
+ quotes: {
2285
+ type: SyntaxRuleType.Native
2286
+ },
2287
+ 'mask-image': {
2288
+ type: SyntaxRuleType.Native,
2289
+ declare (value) {
2290
+ return {
2291
+ '-webkit-mask-image': value,
2292
+ 'mask-image': value
2293
+ };
2294
+ }
2295
+ }
2296
+ };
2297
+
2298
+ export { rules as default };