cssstyle 6.0.0 → 6.0.1
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// autogenerated - 2026-02-
|
|
2
|
+
// autogenerated - 2026-02-06
|
|
3
3
|
|
|
4
4
|
module.exports = new Map([
|
|
5
5
|
[
|
|
@@ -41,7 +41,7 @@ module.exports = new Map([
|
|
|
41
41
|
"WebkitAlignSelf",
|
|
42
42
|
"webkitAlignSelf"
|
|
43
43
|
],
|
|
44
|
-
"syntax": "auto |
|
|
44
|
+
"syntax": "auto | <overflow-position>? [ normal | <self-position> ]| stretch | <baseline-position>"
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
47
|
[
|
|
@@ -1078,7 +1078,7 @@ module.exports = new Map([
|
|
|
1078
1078
|
"align-self",
|
|
1079
1079
|
"alignSelf"
|
|
1080
1080
|
],
|
|
1081
|
-
"syntax": "auto |
|
|
1081
|
+
"syntax": "auto | <overflow-position>? [ normal | <self-position> ]| stretch | <baseline-position> | anchor-center"
|
|
1082
1082
|
}
|
|
1083
1083
|
],
|
|
1084
1084
|
[
|
|
@@ -1134,7 +1134,7 @@ module.exports = new Map([
|
|
|
1134
1134
|
"anchor-name",
|
|
1135
1135
|
"anchorName"
|
|
1136
1136
|
],
|
|
1137
|
-
"syntax": "none | <
|
|
1137
|
+
"syntax": "none | <anchor-name>#"
|
|
1138
1138
|
}
|
|
1139
1139
|
],
|
|
1140
1140
|
[
|
|
@@ -1153,7 +1153,7 @@ module.exports = new Map([
|
|
|
1153
1153
|
"anchor-scope",
|
|
1154
1154
|
"anchorScope"
|
|
1155
1155
|
],
|
|
1156
|
-
"syntax": "none | all | <
|
|
1156
|
+
"syntax": "none | all | <anchor-name>#"
|
|
1157
1157
|
}
|
|
1158
1158
|
],
|
|
1159
1159
|
[
|
|
@@ -4419,7 +4419,7 @@ module.exports = new Map([
|
|
|
4419
4419
|
{
|
|
4420
4420
|
"name": "column-rule-edge-inset-end",
|
|
4421
4421
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-edge-inset-end",
|
|
4422
|
-
"initial": "
|
|
4422
|
+
"initial": "0",
|
|
4423
4423
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
4424
4424
|
"inherited": "no",
|
|
4425
4425
|
"percentages": "refer to the crossing gap width",
|
|
@@ -4430,7 +4430,7 @@ module.exports = new Map([
|
|
|
4430
4430
|
"column-rule-edge-inset-end",
|
|
4431
4431
|
"columnRuleEdgeInsetEnd"
|
|
4432
4432
|
],
|
|
4433
|
-
"syntax": "
|
|
4433
|
+
"syntax": "<length-percentage>"
|
|
4434
4434
|
}
|
|
4435
4435
|
],
|
|
4436
4436
|
[
|
|
@@ -4438,7 +4438,7 @@ module.exports = new Map([
|
|
|
4438
4438
|
{
|
|
4439
4439
|
"name": "column-rule-edge-inset-start",
|
|
4440
4440
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-edge-inset-start",
|
|
4441
|
-
"initial": "
|
|
4441
|
+
"initial": "0",
|
|
4442
4442
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
4443
4443
|
"inherited": "no",
|
|
4444
4444
|
"percentages": "refer to the crossing gap width",
|
|
@@ -4449,7 +4449,7 @@ module.exports = new Map([
|
|
|
4449
4449
|
"column-rule-edge-inset-start",
|
|
4450
4450
|
"columnRuleEdgeInsetStart"
|
|
4451
4451
|
],
|
|
4452
|
-
"syntax": "
|
|
4452
|
+
"syntax": "<length-percentage>"
|
|
4453
4453
|
}
|
|
4454
4454
|
],
|
|
4455
4455
|
[
|
|
@@ -4487,7 +4487,7 @@ module.exports = new Map([
|
|
|
4487
4487
|
"column-rule-inset-end",
|
|
4488
4488
|
"columnRuleInsetEnd"
|
|
4489
4489
|
],
|
|
4490
|
-
"syntax": "
|
|
4490
|
+
"syntax": "<length-percentage>"
|
|
4491
4491
|
}
|
|
4492
4492
|
],
|
|
4493
4493
|
[
|
|
@@ -4506,7 +4506,7 @@ module.exports = new Map([
|
|
|
4506
4506
|
"column-rule-inset-start",
|
|
4507
4507
|
"columnRuleInsetStart"
|
|
4508
4508
|
],
|
|
4509
|
-
"syntax": "
|
|
4509
|
+
"syntax": "<length-percentage>"
|
|
4510
4510
|
}
|
|
4511
4511
|
],
|
|
4512
4512
|
[
|
|
@@ -4533,7 +4533,7 @@ module.exports = new Map([
|
|
|
4533
4533
|
{
|
|
4534
4534
|
"name": "column-rule-interior-inset-end",
|
|
4535
4535
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-interior-inset-end",
|
|
4536
|
-
"initial": "
|
|
4536
|
+
"initial": "0",
|
|
4537
4537
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
4538
4538
|
"inherited": "no",
|
|
4539
4539
|
"percentages": "refer to the crossing gap width",
|
|
@@ -4544,7 +4544,7 @@ module.exports = new Map([
|
|
|
4544
4544
|
"column-rule-interior-inset-end",
|
|
4545
4545
|
"columnRuleInteriorInsetEnd"
|
|
4546
4546
|
],
|
|
4547
|
-
"syntax": "
|
|
4547
|
+
"syntax": "<length-percentage>"
|
|
4548
4548
|
}
|
|
4549
4549
|
],
|
|
4550
4550
|
[
|
|
@@ -4552,7 +4552,7 @@ module.exports = new Map([
|
|
|
4552
4552
|
{
|
|
4553
4553
|
"name": "column-rule-interior-inset-start",
|
|
4554
4554
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-interior-inset-start",
|
|
4555
|
-
"initial": "
|
|
4555
|
+
"initial": "0",
|
|
4556
4556
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
4557
4557
|
"inherited": "no",
|
|
4558
4558
|
"percentages": "refer to the crossing gap width",
|
|
@@ -4563,7 +4563,7 @@ module.exports = new Map([
|
|
|
4563
4563
|
"column-rule-interior-inset-start",
|
|
4564
4564
|
"columnRuleInteriorInsetStart"
|
|
4565
4565
|
],
|
|
4566
|
-
"syntax": "
|
|
4566
|
+
"syntax": "<length-percentage>"
|
|
4567
4567
|
}
|
|
4568
4568
|
],
|
|
4569
4569
|
[
|
|
@@ -4585,6 +4585,25 @@ module.exports = new Map([
|
|
|
4585
4585
|
"syntax": "<line-style-list> | <auto-line-style-list>"
|
|
4586
4586
|
}
|
|
4587
4587
|
],
|
|
4588
|
+
[
|
|
4589
|
+
"column-rule-visibility-items",
|
|
4590
|
+
{
|
|
4591
|
+
"name": "column-rule-visibility-items",
|
|
4592
|
+
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-column-rule-visibility-items",
|
|
4593
|
+
"initial": "all",
|
|
4594
|
+
"appliesTo": "grid containers, and multicol containers",
|
|
4595
|
+
"inherited": "no",
|
|
4596
|
+
"percentages": "n/a",
|
|
4597
|
+
"computedValue": "as specified",
|
|
4598
|
+
"canonicalOrder": "per grammar",
|
|
4599
|
+
"animationType": "discrete",
|
|
4600
|
+
"styleDeclaration": [
|
|
4601
|
+
"column-rule-visibility-items",
|
|
4602
|
+
"columnRuleVisibilityItems"
|
|
4603
|
+
],
|
|
4604
|
+
"syntax": "all | around | between"
|
|
4605
|
+
}
|
|
4606
|
+
],
|
|
4588
4607
|
[
|
|
4589
4608
|
"column-rule-width",
|
|
4590
4609
|
{
|
|
@@ -8119,7 +8138,7 @@ module.exports = new Map([
|
|
|
8119
8138
|
"justify-self",
|
|
8120
8139
|
"justifySelf"
|
|
8121
8140
|
],
|
|
8122
|
-
"syntax": "auto |
|
|
8141
|
+
"syntax": "auto | <overflow-position>? [ normal | <self-position> | left | right ] | stretch | <baseline-position> | anchor-center"
|
|
8123
8142
|
}
|
|
8124
8143
|
],
|
|
8125
8144
|
[
|
|
@@ -10828,7 +10847,7 @@ module.exports = new Map([
|
|
|
10828
10847
|
{
|
|
10829
10848
|
"name": "position-anchor",
|
|
10830
10849
|
"href": "https://drafts.csswg.org/css-anchor-position-1/#propdef-position-anchor",
|
|
10831
|
-
"initial": "
|
|
10850
|
+
"initial": "normal",
|
|
10832
10851
|
"appliesTo": "absolutely positioned boxes",
|
|
10833
10852
|
"inherited": "no",
|
|
10834
10853
|
"percentages": "n/a",
|
|
@@ -10839,7 +10858,7 @@ module.exports = new Map([
|
|
|
10839
10858
|
"position-anchor",
|
|
10840
10859
|
"positionAnchor"
|
|
10841
10860
|
],
|
|
10842
|
-
"syntax": "none | auto | <anchor-name>"
|
|
10861
|
+
"syntax": "normal | none | auto | <anchor-name>"
|
|
10843
10862
|
}
|
|
10844
10863
|
],
|
|
10845
10864
|
[
|
|
@@ -11260,7 +11279,7 @@ module.exports = new Map([
|
|
|
11260
11279
|
{
|
|
11261
11280
|
"name": "row-rule-edge-inset-end",
|
|
11262
11281
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-edge-inset-end",
|
|
11263
|
-
"initial": "
|
|
11282
|
+
"initial": "0",
|
|
11264
11283
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
11265
11284
|
"inherited": "no",
|
|
11266
11285
|
"percentages": "refer to the crossing gap width",
|
|
@@ -11271,7 +11290,7 @@ module.exports = new Map([
|
|
|
11271
11290
|
"row-rule-edge-inset-end",
|
|
11272
11291
|
"rowRuleEdgeInsetEnd"
|
|
11273
11292
|
],
|
|
11274
|
-
"syntax": "
|
|
11293
|
+
"syntax": "<length-percentage>"
|
|
11275
11294
|
}
|
|
11276
11295
|
],
|
|
11277
11296
|
[
|
|
@@ -11279,7 +11298,7 @@ module.exports = new Map([
|
|
|
11279
11298
|
{
|
|
11280
11299
|
"name": "row-rule-edge-inset-start",
|
|
11281
11300
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-edge-inset-start",
|
|
11282
|
-
"initial": "
|
|
11301
|
+
"initial": "0",
|
|
11283
11302
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
11284
11303
|
"inherited": "no",
|
|
11285
11304
|
"percentages": "refer to the crossing gap width",
|
|
@@ -11290,7 +11309,7 @@ module.exports = new Map([
|
|
|
11290
11309
|
"row-rule-edge-inset-start",
|
|
11291
11310
|
"rowRuleEdgeInsetStart"
|
|
11292
11311
|
],
|
|
11293
|
-
"syntax": "
|
|
11312
|
+
"syntax": "<length-percentage>"
|
|
11294
11313
|
}
|
|
11295
11314
|
],
|
|
11296
11315
|
[
|
|
@@ -11328,7 +11347,7 @@ module.exports = new Map([
|
|
|
11328
11347
|
"row-rule-inset-end",
|
|
11329
11348
|
"rowRuleInsetEnd"
|
|
11330
11349
|
],
|
|
11331
|
-
"syntax": "
|
|
11350
|
+
"syntax": "<length-percentage>"
|
|
11332
11351
|
}
|
|
11333
11352
|
],
|
|
11334
11353
|
[
|
|
@@ -11347,7 +11366,7 @@ module.exports = new Map([
|
|
|
11347
11366
|
"row-rule-inset-start",
|
|
11348
11367
|
"rowRuleInsetStart"
|
|
11349
11368
|
],
|
|
11350
|
-
"syntax": "
|
|
11369
|
+
"syntax": "<length-percentage>"
|
|
11351
11370
|
}
|
|
11352
11371
|
],
|
|
11353
11372
|
[
|
|
@@ -11374,7 +11393,7 @@ module.exports = new Map([
|
|
|
11374
11393
|
{
|
|
11375
11394
|
"name": "row-rule-interior-inset-end",
|
|
11376
11395
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-interior-inset-end",
|
|
11377
|
-
"initial": "
|
|
11396
|
+
"initial": "0",
|
|
11378
11397
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
11379
11398
|
"inherited": "no",
|
|
11380
11399
|
"percentages": "refer to the crossing gap width",
|
|
@@ -11385,7 +11404,7 @@ module.exports = new Map([
|
|
|
11385
11404
|
"row-rule-interior-inset-end",
|
|
11386
11405
|
"rowRuleInteriorInsetEnd"
|
|
11387
11406
|
],
|
|
11388
|
-
"syntax": "
|
|
11407
|
+
"syntax": "<length-percentage>"
|
|
11389
11408
|
}
|
|
11390
11409
|
],
|
|
11391
11410
|
[
|
|
@@ -11393,7 +11412,7 @@ module.exports = new Map([
|
|
|
11393
11412
|
{
|
|
11394
11413
|
"name": "row-rule-interior-inset-start",
|
|
11395
11414
|
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-interior-inset-start",
|
|
11396
|
-
"initial": "
|
|
11415
|
+
"initial": "0",
|
|
11397
11416
|
"appliesTo": "grid containers, flex containers, multicol containers, and grid lanes containers",
|
|
11398
11417
|
"inherited": "no",
|
|
11399
11418
|
"percentages": "refer to the crossing gap width",
|
|
@@ -11404,7 +11423,7 @@ module.exports = new Map([
|
|
|
11404
11423
|
"row-rule-interior-inset-start",
|
|
11405
11424
|
"rowRuleInteriorInsetStart"
|
|
11406
11425
|
],
|
|
11407
|
-
"syntax": "
|
|
11426
|
+
"syntax": "<length-percentage>"
|
|
11408
11427
|
}
|
|
11409
11428
|
],
|
|
11410
11429
|
[
|
|
@@ -11426,6 +11445,25 @@ module.exports = new Map([
|
|
|
11426
11445
|
"syntax": "<line-style-list> | <auto-line-style-list>"
|
|
11427
11446
|
}
|
|
11428
11447
|
],
|
|
11448
|
+
[
|
|
11449
|
+
"row-rule-visibility-items",
|
|
11450
|
+
{
|
|
11451
|
+
"name": "row-rule-visibility-items",
|
|
11452
|
+
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-row-rule-visibility-items",
|
|
11453
|
+
"initial": "all",
|
|
11454
|
+
"appliesTo": "grid containers, and multicol containers",
|
|
11455
|
+
"inherited": "no",
|
|
11456
|
+
"percentages": "n/a",
|
|
11457
|
+
"computedValue": "as specified",
|
|
11458
|
+
"canonicalOrder": "per grammar",
|
|
11459
|
+
"animationType": "discrete",
|
|
11460
|
+
"styleDeclaration": [
|
|
11461
|
+
"row-rule-visibility-items",
|
|
11462
|
+
"rowRuleVisibilityItems"
|
|
11463
|
+
],
|
|
11464
|
+
"syntax": "all | around | between"
|
|
11465
|
+
}
|
|
11466
|
+
],
|
|
11429
11467
|
[
|
|
11430
11468
|
"row-rule-width",
|
|
11431
11469
|
{
|
|
@@ -11710,6 +11748,25 @@ module.exports = new Map([
|
|
|
11710
11748
|
"syntax": "<'column-rule-style'>"
|
|
11711
11749
|
}
|
|
11712
11750
|
],
|
|
11751
|
+
[
|
|
11752
|
+
"rule-visibility-items",
|
|
11753
|
+
{
|
|
11754
|
+
"name": "rule-visibility-items",
|
|
11755
|
+
"href": "https://drafts.csswg.org/css-gaps-1/#propdef-rule-visibility-items",
|
|
11756
|
+
"initial": "see individual properties",
|
|
11757
|
+
"appliesTo": "Same as column-rule-visibility-items and row-rule-visibility-items",
|
|
11758
|
+
"inherited": "see individual properties",
|
|
11759
|
+
"percentages": "see individual properties",
|
|
11760
|
+
"computedValue": "see individual properties",
|
|
11761
|
+
"animationType": "see individual properties",
|
|
11762
|
+
"canonicalOrder": "per grammar",
|
|
11763
|
+
"styleDeclaration": [
|
|
11764
|
+
"rule-visibility-items",
|
|
11765
|
+
"ruleVisibilityItems"
|
|
11766
|
+
],
|
|
11767
|
+
"syntax": "<'column-rule-visibility-items'>"
|
|
11768
|
+
}
|
|
11769
|
+
],
|
|
11713
11770
|
[
|
|
11714
11771
|
"rule-width",
|
|
11715
11772
|
{
|
|
@@ -11811,7 +11868,7 @@ module.exports = new Map([
|
|
|
11811
11868
|
"appliesTo": "all elements",
|
|
11812
11869
|
"inherited": "no",
|
|
11813
11870
|
"percentages": "N/A",
|
|
11814
|
-
"computedValue": "
|
|
11871
|
+
"computedValue": "specified keyword",
|
|
11815
11872
|
"canonicalOrder": "per grammar",
|
|
11816
11873
|
"animationType": "none",
|
|
11817
11874
|
"styleDeclaration": [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// autogenerated - 2026-02-
|
|
2
|
+
// autogenerated - 2026-02-06
|
|
3
3
|
|
|
4
4
|
const background = require("../properties/background.js");
|
|
5
5
|
const backgroundAttachment = require("../properties/backgroundAttachment.js");
|
|
@@ -651,6 +651,8 @@ module.exports = {
|
|
|
651
651
|
"columnRuleInteriorInsetStart": createGenericPropertyDescriptor("column-rule-interior-inset-start", {"caseSensitive":false,"dimensionTypes":{"length":{"type":"length"}}}),
|
|
652
652
|
"column-rule-style": createGenericPropertyDescriptor("column-rule-style", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
653
653
|
"columnRuleStyle": createGenericPropertyDescriptor("column-rule-style", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
654
|
+
"column-rule-visibility-items": createGenericPropertyDescriptor("column-rule-visibility-items", {"caseSensitive":false}),
|
|
655
|
+
"columnRuleVisibilityItems": createGenericPropertyDescriptor("column-rule-visibility-items", {"caseSensitive":false}),
|
|
654
656
|
"column-rule-width": createGenericPropertyDescriptor("column-rule-width", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"},"length":{"max":null,"min":0,"type":"length"}}}),
|
|
655
657
|
"columnRuleWidth": createGenericPropertyDescriptor("column-rule-width", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"},"length":{"max":null,"min":0,"type":"length"}}}),
|
|
656
658
|
"column-span": createGenericPropertyDescriptor("column-span", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
@@ -1320,6 +1322,8 @@ module.exports = {
|
|
|
1320
1322
|
"rowRuleInteriorInsetStart": createGenericPropertyDescriptor("row-rule-interior-inset-start", {"caseSensitive":false,"dimensionTypes":{"length":{"type":"length"}}}),
|
|
1321
1323
|
"row-rule-style": createGenericPropertyDescriptor("row-rule-style", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
1322
1324
|
"rowRuleStyle": createGenericPropertyDescriptor("row-rule-style", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
1325
|
+
"row-rule-visibility-items": createGenericPropertyDescriptor("row-rule-visibility-items", {"caseSensitive":false}),
|
|
1326
|
+
"rowRuleVisibilityItems": createGenericPropertyDescriptor("row-rule-visibility-items", {"caseSensitive":false}),
|
|
1323
1327
|
"row-rule-width": createGenericPropertyDescriptor("row-rule-width", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"},"length":{"max":null,"min":0,"type":"length"}}}),
|
|
1324
1328
|
"rowRuleWidth": createGenericPropertyDescriptor("row-rule-width", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"},"length":{"max":null,"min":0,"type":"length"}}}),
|
|
1325
1329
|
"ruby-align": createGenericPropertyDescriptor("ruby-align", {"caseSensitive":false}),
|
|
@@ -1349,6 +1353,8 @@ module.exports = {
|
|
|
1349
1353
|
"ruleOverlap": createGenericPropertyDescriptor("rule-overlap", {"caseSensitive":false}),
|
|
1350
1354
|
"rule-style": createGenericPropertyDescriptor("rule-style", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
1351
1355
|
"ruleStyle": createGenericPropertyDescriptor("rule-style", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"}}}),
|
|
1356
|
+
"rule-visibility-items": createGenericPropertyDescriptor("rule-visibility-items", {"caseSensitive":false}),
|
|
1357
|
+
"ruleVisibilityItems": createGenericPropertyDescriptor("rule-visibility-items", {"caseSensitive":false}),
|
|
1352
1358
|
"rule-width": createGenericPropertyDescriptor("rule-width", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"},"length":{"max":null,"min":0,"type":"length"}}}),
|
|
1353
1359
|
"ruleWidth": createGenericPropertyDescriptor("rule-width", {"caseSensitive":false,"dimensionTypes":{"number":{"max":null,"min":1,"type":"number"},"length":{"max":null,"min":0,"type":"length"}}}),
|
|
1354
1360
|
"rx": createGenericPropertyDescriptor("rx", {"caseSensitive":false,"dimensionTypes":{"length":{"type":"length"}}}),
|
package/lib/parsers.js
CHANGED
|
@@ -297,48 +297,40 @@ function parsePropertyValue(prop, val, opt = {}) {
|
|
|
297
297
|
break;
|
|
298
298
|
}
|
|
299
299
|
case AST_TYPES.FUNCTION: {
|
|
300
|
-
const
|
|
301
|
-
.generate(item)
|
|
302
|
-
.replace(/\)(?!\)|\s|,)/g, ") ")
|
|
303
|
-
.trim();
|
|
304
|
-
const raw = itemCount === 1 ? val : css;
|
|
300
|
+
const raw = itemCount === 1 ? val : cssTree.generate(item).replace(/\)(?!\)|\s|,)/g, ") ");
|
|
305
301
|
// Remove "${name}(" from the start and ")" from the end
|
|
306
|
-
const itemValue = raw.slice(name.length + 1, -1)
|
|
302
|
+
const itemValue = raw.trim().slice(name.length + 1, -1);
|
|
307
303
|
if (name === "calc") {
|
|
308
304
|
if (children.size === 1) {
|
|
309
305
|
const child = children.first;
|
|
310
306
|
if (child.type === AST_TYPES.NUMBER) {
|
|
311
307
|
values.push({
|
|
312
308
|
type: AST_TYPES.CALC,
|
|
313
|
-
isNumber: true,
|
|
314
|
-
value: `${parseFloat(child.value)}`,
|
|
315
309
|
name,
|
|
316
|
-
|
|
310
|
+
isNumber: true,
|
|
311
|
+
value: `${parseFloat(child.value)}`
|
|
317
312
|
});
|
|
318
313
|
} else {
|
|
319
314
|
values.push({
|
|
320
315
|
type: AST_TYPES.CALC,
|
|
321
|
-
isNumber: false,
|
|
322
|
-
value: `${asciiLowercase(itemValue)}`,
|
|
323
316
|
name,
|
|
324
|
-
|
|
317
|
+
isNumber: false,
|
|
318
|
+
value: asciiLowercase(itemValue)
|
|
325
319
|
});
|
|
326
320
|
}
|
|
327
321
|
} else {
|
|
328
322
|
values.push({
|
|
329
323
|
type: AST_TYPES.CALC,
|
|
330
|
-
isNumber: false,
|
|
331
|
-
value: asciiLowercase(itemValue),
|
|
332
324
|
name,
|
|
333
|
-
|
|
325
|
+
isNumber: false,
|
|
326
|
+
value: asciiLowercase(itemValue)
|
|
334
327
|
});
|
|
335
328
|
}
|
|
336
329
|
} else {
|
|
337
330
|
values.push({
|
|
338
331
|
type,
|
|
339
332
|
name,
|
|
340
|
-
value: asciiLowercase(itemValue)
|
|
341
|
-
raw
|
|
333
|
+
value: caseSensitive ? itemValue : asciiLowercase(itemValue)
|
|
342
334
|
});
|
|
343
335
|
}
|
|
344
336
|
break;
|
|
@@ -30,6 +30,7 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp
|
|
|
30
30
|
const parsedValue = parsers.parsePropertyValue(property, v, {
|
|
31
31
|
caseSensitive
|
|
32
32
|
});
|
|
33
|
+
const priority = this._priorities.get(property) ?? "";
|
|
33
34
|
if (Array.isArray(parsedValue)) {
|
|
34
35
|
if (parsedValue.length === 1) {
|
|
35
36
|
const {
|
|
@@ -43,7 +44,7 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp
|
|
|
43
44
|
const [{ name, type, value: itemValue }] = parsedValue;
|
|
44
45
|
switch (type) {
|
|
45
46
|
case AST_TYPES.CALC: {
|
|
46
|
-
this._setProperty(property, `${name}(${itemValue})
|
|
47
|
+
this._setProperty(property, `${name}(${itemValue})`, priority);
|
|
47
48
|
break;
|
|
48
49
|
}
|
|
49
50
|
case AST_TYPES.DIMENSION: {
|
|
@@ -58,11 +59,11 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp
|
|
|
58
59
|
} else {
|
|
59
60
|
val = parsers.serializeDimension(parsedValue, dimensionType);
|
|
60
61
|
}
|
|
61
|
-
this._setProperty(property, val);
|
|
62
|
+
this._setProperty(property, val, priority);
|
|
62
63
|
break;
|
|
63
64
|
}
|
|
64
65
|
case AST_TYPES.HASH: {
|
|
65
|
-
this._setProperty(property, parsers.serializeColor(parsedValue));
|
|
66
|
+
this._setProperty(property, parsers.serializeColor(parsedValue), priority);
|
|
66
67
|
break;
|
|
67
68
|
}
|
|
68
69
|
case AST_TYPES.NUMBER: {
|
|
@@ -76,12 +77,12 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp
|
|
|
76
77
|
} else if (percentageType) {
|
|
77
78
|
val = parsers.serializePercentage(parsedValue, percentageType);
|
|
78
79
|
}
|
|
79
|
-
this._setProperty(property, val);
|
|
80
|
+
this._setProperty(property, val, priority);
|
|
80
81
|
break;
|
|
81
82
|
}
|
|
82
83
|
case AST_TYPES.GLOBAL_KEYWORD:
|
|
83
84
|
case AST_TYPES.IDENTIFIER: {
|
|
84
|
-
this._setProperty(property, name);
|
|
85
|
+
this._setProperty(property, name, priority);
|
|
85
86
|
break;
|
|
86
87
|
}
|
|
87
88
|
case AST_TYPES.PERCENTAGE: {
|
|
@@ -96,36 +97,35 @@ function createGenericPropertyDescriptor(property, { caseSensitive, dimensionTyp
|
|
|
96
97
|
numericType = lengthType;
|
|
97
98
|
}
|
|
98
99
|
if (numericType) {
|
|
99
|
-
this._setProperty(property, parsers.resolveNumericValue(parsedValue, numericType));
|
|
100
|
+
this._setProperty(property, parsers.resolveNumericValue(parsedValue, numericType), priority);
|
|
100
101
|
}
|
|
101
102
|
break;
|
|
102
103
|
}
|
|
103
104
|
case AST_TYPES.STRING: {
|
|
104
|
-
this._setProperty(property, parsers.serializeString(parsedValue));
|
|
105
|
+
this._setProperty(property, parsers.serializeString(parsedValue), priority);
|
|
105
106
|
break;
|
|
106
107
|
}
|
|
107
108
|
case AST_TYPES.URL: {
|
|
108
|
-
this._setProperty(property, parsers.serializeURL(parsedValue));
|
|
109
|
+
this._setProperty(property, parsers.serializeURL(parsedValue), priority);
|
|
109
110
|
break;
|
|
110
111
|
}
|
|
111
112
|
case AST_TYPES.FUNCTION:
|
|
112
113
|
default: {
|
|
113
114
|
if (colorType) {
|
|
114
|
-
this._setProperty(property, parsers.serializeColor(parsedValue));
|
|
115
|
+
this._setProperty(property, parsers.serializeColor(parsedValue), priority);
|
|
115
116
|
} else if (imageType) {
|
|
116
|
-
this._setProperty(property, parsers.serializeGradient(parsedValue));
|
|
117
|
+
this._setProperty(property, parsers.serializeGradient(parsedValue), priority);
|
|
117
118
|
} else {
|
|
118
|
-
this._setProperty(property, value);
|
|
119
|
+
this._setProperty(property, value, priority);
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
} else {
|
|
123
124
|
// Set the prepared value for lists containing multiple values.
|
|
124
|
-
this._setProperty(property, value);
|
|
125
|
+
this._setProperty(property, value, priority);
|
|
125
126
|
}
|
|
126
127
|
} else if (typeof parsedValue === "string") {
|
|
127
|
-
|
|
128
|
-
this._setProperty(property, parsedValue);
|
|
128
|
+
this._setProperty(property, parsedValue, priority);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
},
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"CSSStyleDeclaration",
|
|
7
7
|
"StyleSheet"
|
|
8
8
|
],
|
|
9
|
-
"version": "6.0.
|
|
9
|
+
"version": "6.0.1",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/jsdom/cssstyle.git"
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
],
|
|
17
17
|
"main": "./lib/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@asamuzakjp/css-color": "^4.1.
|
|
19
|
+
"@asamuzakjp/css-color": "^4.1.2",
|
|
20
20
|
"@csstools/css-syntax-patches-for-csstree": "^1.0.26",
|
|
21
21
|
"css-tree": "^3.1.0",
|
|
22
22
|
"lru-cache": "^11.2.5"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@domenic/eslint-config": "^4.1.0",
|
|
26
|
-
"@webref/css": "^8.2.
|
|
26
|
+
"@webref/css": "^8.2.4",
|
|
27
27
|
"eslint": "^9.39.2",
|
|
28
28
|
"eslint-config-prettier": "^10.1.8",
|
|
29
29
|
"eslint-plugin-prettier": "^5.5.5",
|