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

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