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