@master/css 2.0.0-rc.5 → 2.0.0-rc.50

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