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