@master/css 2.0.0-rc.26 → 2.0.0-rc.27

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