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

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