vscode-css-languageservice 6.2.7 → 6.2.8
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.
- package/lib/esm/data/webCustomData.js +55 -55
- package/lib/esm/parser/cssParser.js +40 -5
- package/lib/esm/services/selectorPrinting.js +56 -32
- package/lib/umd/data/webCustomData.js +55 -55
- package/lib/umd/parser/cssParser.js +40 -5
- package/lib/umd/services/selectorPrinting.js +56 -32
- package/package.json +6 -6
|
@@ -704,7 +704,7 @@ export const cssData = {
|
|
|
704
704
|
}
|
|
705
705
|
],
|
|
706
706
|
"syntax": "[ none | <keyframes-name> ]#",
|
|
707
|
-
"relevance":
|
|
707
|
+
"relevance": 71,
|
|
708
708
|
"references": [
|
|
709
709
|
{
|
|
710
710
|
"name": "MDN Reference",
|
|
@@ -794,7 +794,7 @@ export const cssData = {
|
|
|
794
794
|
}
|
|
795
795
|
],
|
|
796
796
|
"syntax": "visible | hidden",
|
|
797
|
-
"relevance":
|
|
797
|
+
"relevance": 59,
|
|
798
798
|
"references": [
|
|
799
799
|
{
|
|
800
800
|
"name": "MDN Reference",
|
|
@@ -1026,7 +1026,7 @@ export const cssData = {
|
|
|
1026
1026
|
"O10.5"
|
|
1027
1027
|
],
|
|
1028
1028
|
"syntax": "<box>#",
|
|
1029
|
-
"relevance":
|
|
1029
|
+
"relevance": 68,
|
|
1030
1030
|
"references": [
|
|
1031
1031
|
{
|
|
1032
1032
|
"name": "MDN Reference",
|
|
@@ -1227,7 +1227,7 @@ export const cssData = {
|
|
|
1227
1227
|
],
|
|
1228
1228
|
"values": [],
|
|
1229
1229
|
"syntax": "<repeat-style>#",
|
|
1230
|
-
"relevance":
|
|
1230
|
+
"relevance": 84,
|
|
1231
1231
|
"references": [
|
|
1232
1232
|
{
|
|
1233
1233
|
"name": "MDN Reference",
|
|
@@ -1264,7 +1264,7 @@ export const cssData = {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
],
|
|
1266
1266
|
"syntax": "<bg-size>#",
|
|
1267
|
-
"relevance":
|
|
1267
|
+
"relevance": 84,
|
|
1268
1268
|
"references": [
|
|
1269
1269
|
{
|
|
1270
1270
|
"name": "MDN Reference",
|
|
@@ -1692,7 +1692,7 @@ export const cssData = {
|
|
|
1692
1692
|
}
|
|
1693
1693
|
],
|
|
1694
1694
|
"syntax": "collapse | separate",
|
|
1695
|
-
"relevance":
|
|
1695
|
+
"relevance": 73,
|
|
1696
1696
|
"references": [
|
|
1697
1697
|
{
|
|
1698
1698
|
"name": "MDN Reference",
|
|
@@ -1772,7 +1772,7 @@ export const cssData = {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
],
|
|
1774
1774
|
"syntax": "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
|
|
1775
|
-
"relevance":
|
|
1775
|
+
"relevance": 52,
|
|
1776
1776
|
"references": [
|
|
1777
1777
|
{
|
|
1778
1778
|
"name": "MDN Reference",
|
|
@@ -2164,7 +2164,7 @@ export const cssData = {
|
|
|
2164
2164
|
"O3.5"
|
|
2165
2165
|
],
|
|
2166
2166
|
"syntax": "<color>",
|
|
2167
|
-
"relevance":
|
|
2167
|
+
"relevance": 68,
|
|
2168
2168
|
"references": [
|
|
2169
2169
|
{
|
|
2170
2170
|
"name": "MDN Reference",
|
|
@@ -2284,7 +2284,7 @@ export const cssData = {
|
|
|
2284
2284
|
"O3.5"
|
|
2285
2285
|
],
|
|
2286
2286
|
"syntax": "<color>",
|
|
2287
|
-
"relevance":
|
|
2287
|
+
"relevance": 67,
|
|
2288
2288
|
"references": [
|
|
2289
2289
|
{
|
|
2290
2290
|
"name": "MDN Reference",
|
|
@@ -2401,7 +2401,7 @@ export const cssData = {
|
|
|
2401
2401
|
"O3.5"
|
|
2402
2402
|
],
|
|
2403
2403
|
"syntax": "<line-width> || <line-style> || <color>",
|
|
2404
|
-
"relevance":
|
|
2404
|
+
"relevance": 87,
|
|
2405
2405
|
"references": [
|
|
2406
2406
|
{
|
|
2407
2407
|
"name": "MDN Reference",
|
|
@@ -2642,7 +2642,7 @@ export const cssData = {
|
|
|
2642
2642
|
}
|
|
2643
2643
|
],
|
|
2644
2644
|
"syntax": "none | <shadow>#",
|
|
2645
|
-
"relevance":
|
|
2645
|
+
"relevance": 89,
|
|
2646
2646
|
"references": [
|
|
2647
2647
|
{
|
|
2648
2648
|
"name": "MDN Reference",
|
|
@@ -2976,7 +2976,7 @@ export const cssData = {
|
|
|
2976
2976
|
}
|
|
2977
2977
|
],
|
|
2978
2978
|
"syntax": "<shape> | auto",
|
|
2979
|
-
"relevance":
|
|
2979
|
+
"relevance": 75,
|
|
2980
2980
|
"references": [
|
|
2981
2981
|
{
|
|
2982
2982
|
"name": "MDN Reference",
|
|
@@ -3154,7 +3154,7 @@ export const cssData = {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
],
|
|
3156
3156
|
"syntax": "auto | balance | balance-all",
|
|
3157
|
-
"relevance":
|
|
3157
|
+
"relevance": 50,
|
|
3158
3158
|
"references": [
|
|
3159
3159
|
{
|
|
3160
3160
|
"name": "MDN Reference",
|
|
@@ -3474,7 +3474,7 @@ export const cssData = {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
],
|
|
3476
3476
|
"syntax": "normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?",
|
|
3477
|
-
"relevance":
|
|
3477
|
+
"relevance": 89,
|
|
3478
3478
|
"references": [
|
|
3479
3479
|
{
|
|
3480
3480
|
"name": "MDN Reference",
|
|
@@ -3534,7 +3534,7 @@ export const cssData = {
|
|
|
3534
3534
|
}
|
|
3535
3535
|
],
|
|
3536
3536
|
"syntax": "[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none",
|
|
3537
|
-
"relevance":
|
|
3537
|
+
"relevance": 53,
|
|
3538
3538
|
"references": [
|
|
3539
3539
|
{
|
|
3540
3540
|
"name": "MDN Reference",
|
|
@@ -4398,7 +4398,7 @@ export const cssData = {
|
|
|
4398
4398
|
},
|
|
4399
4399
|
{
|
|
4400
4400
|
"name": "fill-opacity",
|
|
4401
|
-
"relevance":
|
|
4401
|
+
"relevance": 52,
|
|
4402
4402
|
"description": "Specifies the opacity of the painting operation used to paint the interior the current object.",
|
|
4403
4403
|
"restrictions": [
|
|
4404
4404
|
"number(0-1)"
|
|
@@ -4535,7 +4535,7 @@ export const cssData = {
|
|
|
4535
4535
|
}
|
|
4536
4536
|
],
|
|
4537
4537
|
"syntax": "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
|
|
4538
|
-
"relevance":
|
|
4538
|
+
"relevance": 80,
|
|
4539
4539
|
"references": [
|
|
4540
4540
|
{
|
|
4541
4541
|
"name": "MDN Reference",
|
|
@@ -4578,7 +4578,7 @@ export const cssData = {
|
|
|
4578
4578
|
}
|
|
4579
4579
|
],
|
|
4580
4580
|
"syntax": "content | <'width'>",
|
|
4581
|
-
"relevance":
|
|
4581
|
+
"relevance": 69,
|
|
4582
4582
|
"references": [
|
|
4583
4583
|
{
|
|
4584
4584
|
"name": "MDN Reference",
|
|
@@ -6166,7 +6166,7 @@ export const cssData = {
|
|
|
6166
6166
|
}
|
|
6167
6167
|
],
|
|
6168
6168
|
"syntax": "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
|
|
6169
|
-
"relevance":
|
|
6169
|
+
"relevance": 53,
|
|
6170
6170
|
"references": [
|
|
6171
6171
|
{
|
|
6172
6172
|
"name": "MDN Reference",
|
|
@@ -6573,7 +6573,7 @@ export const cssData = {
|
|
|
6573
6573
|
}
|
|
6574
6574
|
],
|
|
6575
6575
|
"syntax": "<grid-line> [ / <grid-line> ]?",
|
|
6576
|
-
"relevance":
|
|
6576
|
+
"relevance": 55,
|
|
6577
6577
|
"references": [
|
|
6578
6578
|
{
|
|
6579
6579
|
"name": "MDN Reference",
|
|
@@ -6681,7 +6681,7 @@ export const cssData = {
|
|
|
6681
6681
|
],
|
|
6682
6682
|
"status": "obsolete",
|
|
6683
6683
|
"syntax": "<'grid-row-gap'> <'grid-column-gap'>?",
|
|
6684
|
-
"relevance":
|
|
6684
|
+
"relevance": 4,
|
|
6685
6685
|
"description": "Shorthand that specifies the gutters between grid columns and grid rows in one declaration. Replaced by 'gap' property.",
|
|
6686
6686
|
"restrictions": [
|
|
6687
6687
|
"length"
|
|
@@ -6707,7 +6707,7 @@ export const cssData = {
|
|
|
6707
6707
|
}
|
|
6708
6708
|
],
|
|
6709
6709
|
"syntax": "<grid-line> [ / <grid-line> ]?",
|
|
6710
|
-
"relevance":
|
|
6710
|
+
"relevance": 53,
|
|
6711
6711
|
"references": [
|
|
6712
6712
|
{
|
|
6713
6713
|
"name": "MDN Reference",
|
|
@@ -6930,7 +6930,7 @@ export const cssData = {
|
|
|
6930
6930
|
}
|
|
6931
6931
|
],
|
|
6932
6932
|
"syntax": "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
|
|
6933
|
-
"relevance":
|
|
6933
|
+
"relevance": 63,
|
|
6934
6934
|
"references": [
|
|
6935
6935
|
{
|
|
6936
6936
|
"name": "MDN Reference",
|
|
@@ -7284,7 +7284,7 @@ export const cssData = {
|
|
|
7284
7284
|
}
|
|
7285
7285
|
],
|
|
7286
7286
|
"syntax": "auto | isolate",
|
|
7287
|
-
"relevance":
|
|
7287
|
+
"relevance": 53,
|
|
7288
7288
|
"references": [
|
|
7289
7289
|
{
|
|
7290
7290
|
"name": "MDN Reference",
|
|
@@ -7417,7 +7417,7 @@ export const cssData = {
|
|
|
7417
7417
|
}
|
|
7418
7418
|
],
|
|
7419
7419
|
"syntax": "<length> | <percentage> | auto",
|
|
7420
|
-
"relevance":
|
|
7420
|
+
"relevance": 95,
|
|
7421
7421
|
"references": [
|
|
7422
7422
|
{
|
|
7423
7423
|
"name": "MDN Reference",
|
|
@@ -7699,7 +7699,7 @@ export const cssData = {
|
|
|
7699
7699
|
}
|
|
7700
7700
|
],
|
|
7701
7701
|
"syntax": "inside | outside",
|
|
7702
|
-
"relevance":
|
|
7702
|
+
"relevance": 54,
|
|
7703
7703
|
"references": [
|
|
7704
7704
|
{
|
|
7705
7705
|
"name": "MDN Reference",
|
|
@@ -7796,7 +7796,7 @@ export const cssData = {
|
|
|
7796
7796
|
}
|
|
7797
7797
|
],
|
|
7798
7798
|
"syntax": "<counter-style> | <string> | none",
|
|
7799
|
-
"relevance":
|
|
7799
|
+
"relevance": 74,
|
|
7800
7800
|
"references": [
|
|
7801
7801
|
{
|
|
7802
7802
|
"name": "MDN Reference",
|
|
@@ -7853,7 +7853,7 @@ export const cssData = {
|
|
|
7853
7853
|
}
|
|
7854
7854
|
],
|
|
7855
7855
|
"syntax": "<'margin-left'>",
|
|
7856
|
-
"relevance":
|
|
7856
|
+
"relevance": 55,
|
|
7857
7857
|
"references": [
|
|
7858
7858
|
{
|
|
7859
7859
|
"name": "MDN Reference",
|
|
@@ -7938,7 +7938,7 @@ export const cssData = {
|
|
|
7938
7938
|
}
|
|
7939
7939
|
],
|
|
7940
7940
|
"syntax": "<'margin-left'>",
|
|
7941
|
-
"relevance":
|
|
7941
|
+
"relevance": 57,
|
|
7942
7942
|
"references": [
|
|
7943
7943
|
{
|
|
7944
7944
|
"name": "MDN Reference",
|
|
@@ -12860,7 +12860,7 @@ export const cssData = {
|
|
|
12860
12860
|
}
|
|
12861
12861
|
],
|
|
12862
12862
|
"syntax": "fill | contain | cover | none | scale-down",
|
|
12863
|
-
"relevance":
|
|
12863
|
+
"relevance": 71,
|
|
12864
12864
|
"references": [
|
|
12865
12865
|
{
|
|
12866
12866
|
"name": "MDN Reference",
|
|
@@ -12997,7 +12997,7 @@ export const cssData = {
|
|
|
12997
12997
|
"O9"
|
|
12998
12998
|
],
|
|
12999
12999
|
"syntax": "<alpha-value>",
|
|
13000
|
-
"relevance":
|
|
13000
|
+
"relevance": 93,
|
|
13001
13001
|
"references": [
|
|
13002
13002
|
{
|
|
13003
13003
|
"name": "MDN Reference",
|
|
@@ -13020,7 +13020,7 @@ export const cssData = {
|
|
|
13020
13020
|
"O12.1"
|
|
13021
13021
|
],
|
|
13022
13022
|
"syntax": "<integer>",
|
|
13023
|
-
"relevance":
|
|
13023
|
+
"relevance": 65,
|
|
13024
13024
|
"references": [
|
|
13025
13025
|
{
|
|
13026
13026
|
"name": "MDN Reference",
|
|
@@ -13479,7 +13479,7 @@ export const cssData = {
|
|
|
13479
13479
|
}
|
|
13480
13480
|
],
|
|
13481
13481
|
"syntax": "auto | <'border-style'>",
|
|
13482
|
-
"relevance":
|
|
13482
|
+
"relevance": 61,
|
|
13483
13483
|
"references": [
|
|
13484
13484
|
{
|
|
13485
13485
|
"name": "MDN Reference",
|
|
@@ -13991,7 +13991,7 @@ export const cssData = {
|
|
|
13991
13991
|
}
|
|
13992
13992
|
],
|
|
13993
13993
|
"syntax": "auto | always | avoid | left | right | recto | verso",
|
|
13994
|
-
"relevance":
|
|
13994
|
+
"relevance": 50,
|
|
13995
13995
|
"references": [
|
|
13996
13996
|
{
|
|
13997
13997
|
"name": "MDN Reference",
|
|
@@ -14090,7 +14090,7 @@ export const cssData = {
|
|
|
14090
14090
|
}
|
|
14091
14091
|
],
|
|
14092
14092
|
"syntax": "none | <length>",
|
|
14093
|
-
"relevance":
|
|
14093
|
+
"relevance": 54,
|
|
14094
14094
|
"references": [
|
|
14095
14095
|
{
|
|
14096
14096
|
"name": "MDN Reference",
|
|
@@ -15036,7 +15036,7 @@ export const cssData = {
|
|
|
15036
15036
|
"description": "No paint is applied in this layer."
|
|
15037
15037
|
}
|
|
15038
15038
|
],
|
|
15039
|
-
"relevance":
|
|
15039
|
+
"relevance": 66,
|
|
15040
15040
|
"description": "Paints along the outline of the given graphical element.",
|
|
15041
15041
|
"restrictions": [
|
|
15042
15042
|
"color",
|
|
@@ -15234,7 +15234,7 @@ export const cssData = {
|
|
|
15234
15234
|
}
|
|
15235
15235
|
],
|
|
15236
15236
|
"syntax": "auto | fixed",
|
|
15237
|
-
"relevance":
|
|
15237
|
+
"relevance": 60,
|
|
15238
15238
|
"references": [
|
|
15239
15239
|
{
|
|
15240
15240
|
"name": "MDN Reference",
|
|
@@ -15561,7 +15561,7 @@ export const cssData = {
|
|
|
15561
15561
|
}
|
|
15562
15562
|
],
|
|
15563
15563
|
"syntax": "solid | double | dotted | dashed | wavy",
|
|
15564
|
-
"relevance":
|
|
15564
|
+
"relevance": 51,
|
|
15565
15565
|
"references": [
|
|
15566
15566
|
{
|
|
15567
15567
|
"name": "MDN Reference",
|
|
@@ -15723,7 +15723,7 @@ export const cssData = {
|
|
|
15723
15723
|
}
|
|
15724
15724
|
],
|
|
15725
15725
|
"syntax": "[ clip | ellipsis | <string> ]{1,2}",
|
|
15726
|
-
"relevance":
|
|
15726
|
+
"relevance": 81,
|
|
15727
15727
|
"references": [
|
|
15728
15728
|
{
|
|
15729
15729
|
"name": "MDN Reference",
|
|
@@ -15763,7 +15763,7 @@ export const cssData = {
|
|
|
15763
15763
|
}
|
|
15764
15764
|
],
|
|
15765
15765
|
"syntax": "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
|
|
15766
|
-
"relevance":
|
|
15766
|
+
"relevance": 69,
|
|
15767
15767
|
"references": [
|
|
15768
15768
|
{
|
|
15769
15769
|
"name": "MDN Reference",
|
|
@@ -16198,7 +16198,7 @@ export const cssData = {
|
|
|
16198
16198
|
}
|
|
16199
16199
|
],
|
|
16200
16200
|
"syntax": "<single-transition>#",
|
|
16201
|
-
"relevance":
|
|
16201
|
+
"relevance": 88,
|
|
16202
16202
|
"references": [
|
|
16203
16203
|
{
|
|
16204
16204
|
"name": "MDN Reference",
|
|
@@ -16280,7 +16280,7 @@ export const cssData = {
|
|
|
16280
16280
|
}
|
|
16281
16281
|
],
|
|
16282
16282
|
"syntax": "none | <single-transition-property>#",
|
|
16283
|
-
"relevance":
|
|
16283
|
+
"relevance": 67,
|
|
16284
16284
|
"references": [
|
|
16285
16285
|
{
|
|
16286
16286
|
"name": "MDN Reference",
|
|
@@ -16376,7 +16376,7 @@ export const cssData = {
|
|
|
16376
16376
|
}
|
|
16377
16377
|
],
|
|
16378
16378
|
"syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
|
|
16379
|
-
"relevance":
|
|
16379
|
+
"relevance": 56,
|
|
16380
16380
|
"references": [
|
|
16381
16381
|
{
|
|
16382
16382
|
"name": "MDN Reference",
|
|
@@ -20010,7 +20010,7 @@ export const cssData = {
|
|
|
20010
20010
|
{
|
|
20011
20011
|
"name": "backdrop-filter",
|
|
20012
20012
|
"syntax": "none | <filter-function-list>",
|
|
20013
|
-
"relevance":
|
|
20013
|
+
"relevance": 56,
|
|
20014
20014
|
"browsers": [
|
|
20015
20015
|
"E17",
|
|
20016
20016
|
"FF103",
|
|
@@ -20506,7 +20506,7 @@ export const cssData = {
|
|
|
20506
20506
|
{
|
|
20507
20507
|
"name": "color-scheme",
|
|
20508
20508
|
"syntax": "normal | [ light | dark | <custom-ident> ]+ && only?",
|
|
20509
|
-
"relevance":
|
|
20509
|
+
"relevance": 57,
|
|
20510
20510
|
"browsers": [
|
|
20511
20511
|
"E81",
|
|
20512
20512
|
"FF96",
|
|
@@ -20524,7 +20524,7 @@ export const cssData = {
|
|
|
20524
20524
|
},
|
|
20525
20525
|
{
|
|
20526
20526
|
"name": "contain-intrinsic-size",
|
|
20527
|
-
"syntax": "[
|
|
20527
|
+
"syntax": "[ auto? [ none | <length> ] ]{1,2}",
|
|
20528
20528
|
"relevance": 50,
|
|
20529
20529
|
"browsers": [
|
|
20530
20530
|
"E83",
|
|
@@ -20543,7 +20543,7 @@ export const cssData = {
|
|
|
20543
20543
|
},
|
|
20544
20544
|
{
|
|
20545
20545
|
"name": "contain-intrinsic-block-size",
|
|
20546
|
-
"syntax": "none | <length>
|
|
20546
|
+
"syntax": "auto? [ none | <length> ]",
|
|
20547
20547
|
"relevance": 50,
|
|
20548
20548
|
"browsers": [
|
|
20549
20549
|
"E95",
|
|
@@ -20562,7 +20562,7 @@ export const cssData = {
|
|
|
20562
20562
|
},
|
|
20563
20563
|
{
|
|
20564
20564
|
"name": "contain-intrinsic-height",
|
|
20565
|
-
"syntax": "none | <length>
|
|
20565
|
+
"syntax": "auto? [ none | <length> ]",
|
|
20566
20566
|
"relevance": 50,
|
|
20567
20567
|
"browsers": [
|
|
20568
20568
|
"E95",
|
|
@@ -20581,7 +20581,7 @@ export const cssData = {
|
|
|
20581
20581
|
},
|
|
20582
20582
|
{
|
|
20583
20583
|
"name": "contain-intrinsic-inline-size",
|
|
20584
|
-
"syntax": "none | <length>
|
|
20584
|
+
"syntax": "auto? [ none | <length> ]",
|
|
20585
20585
|
"relevance": 50,
|
|
20586
20586
|
"browsers": [
|
|
20587
20587
|
"E95",
|
|
@@ -20600,7 +20600,7 @@ export const cssData = {
|
|
|
20600
20600
|
},
|
|
20601
20601
|
{
|
|
20602
20602
|
"name": "contain-intrinsic-width",
|
|
20603
|
-
"syntax": "none | <length>
|
|
20603
|
+
"syntax": "auto? [ none | <length> ]",
|
|
20604
20604
|
"relevance": 50,
|
|
20605
20605
|
"browsers": [
|
|
20606
20606
|
"E95",
|
|
@@ -20939,7 +20939,7 @@ export const cssData = {
|
|
|
20939
20939
|
"name": "none"
|
|
20940
20940
|
}
|
|
20941
20941
|
],
|
|
20942
|
-
"relevance":
|
|
20942
|
+
"relevance": 57,
|
|
20943
20943
|
"browsers": [
|
|
20944
20944
|
"E79",
|
|
20945
20945
|
"FF113",
|
|
@@ -20958,7 +20958,7 @@ export const cssData = {
|
|
|
20958
20958
|
{
|
|
20959
20959
|
"name": "gap",
|
|
20960
20960
|
"syntax": "<'row-gap'> <'column-gap'>?",
|
|
20961
|
-
"relevance":
|
|
20961
|
+
"relevance": 67,
|
|
20962
20962
|
"browsers": [
|
|
20963
20963
|
"E16",
|
|
20964
20964
|
"FF52",
|
|
@@ -21268,7 +21268,7 @@ export const cssData = {
|
|
|
21268
21268
|
{
|
|
21269
21269
|
"name": "margin-inline",
|
|
21270
21270
|
"syntax": "<'margin-left'>{1,2}",
|
|
21271
|
-
"relevance":
|
|
21271
|
+
"relevance": 51,
|
|
21272
21272
|
"browsers": [
|
|
21273
21273
|
"E87",
|
|
21274
21274
|
"FF66",
|
|
@@ -21314,7 +21314,7 @@ export const cssData = {
|
|
|
21314
21314
|
{
|
|
21315
21315
|
"name": "mask",
|
|
21316
21316
|
"syntax": "<mask-layer>#",
|
|
21317
|
-
"relevance":
|
|
21317
|
+
"relevance": 51,
|
|
21318
21318
|
"browsers": [
|
|
21319
21319
|
"E79",
|
|
21320
21320
|
"FF2",
|
|
@@ -23287,7 +23287,7 @@ export const cssData = {
|
|
|
23287
23287
|
"atRule": "@font-face",
|
|
23288
23288
|
"status": "experimental",
|
|
23289
23289
|
"syntax": "[ auto | block | swap | fallback | optional ]",
|
|
23290
|
-
"relevance":
|
|
23290
|
+
"relevance": 72,
|
|
23291
23291
|
"description": "The font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use."
|
|
23292
23292
|
},
|
|
23293
23293
|
{
|
|
@@ -696,11 +696,25 @@ export class Parser {
|
|
|
696
696
|
}
|
|
697
697
|
_parseKeyframeSelector() {
|
|
698
698
|
const node = this.create(nodes.KeyframeSelector);
|
|
699
|
-
|
|
699
|
+
let hasContent = false;
|
|
700
|
+
if (node.addChild(this._parseIdent())) {
|
|
701
|
+
hasContent = true;
|
|
702
|
+
}
|
|
703
|
+
if (this.accept(TokenType.Percentage)) {
|
|
704
|
+
hasContent = true;
|
|
705
|
+
}
|
|
706
|
+
if (!hasContent) {
|
|
700
707
|
return null;
|
|
701
708
|
}
|
|
702
709
|
while (this.accept(TokenType.Comma)) {
|
|
703
|
-
|
|
710
|
+
hasContent = false;
|
|
711
|
+
if (node.addChild(this._parseIdent())) {
|
|
712
|
+
hasContent = true;
|
|
713
|
+
}
|
|
714
|
+
if (this.accept(TokenType.Percentage)) {
|
|
715
|
+
hasContent = true;
|
|
716
|
+
}
|
|
717
|
+
if (!hasContent) {
|
|
704
718
|
return this.finish(node, ParseError.PercentageExpected);
|
|
705
719
|
}
|
|
706
720
|
}
|
|
@@ -709,11 +723,25 @@ export class Parser {
|
|
|
709
723
|
_tryParseKeyframeSelector() {
|
|
710
724
|
const node = this.create(nodes.KeyframeSelector);
|
|
711
725
|
const pos = this.mark();
|
|
712
|
-
|
|
726
|
+
let hasContent = false;
|
|
727
|
+
if (node.addChild(this._parseIdent())) {
|
|
728
|
+
hasContent = true;
|
|
729
|
+
}
|
|
730
|
+
if (this.accept(TokenType.Percentage)) {
|
|
731
|
+
hasContent = true;
|
|
732
|
+
}
|
|
733
|
+
if (!hasContent) {
|
|
713
734
|
return null;
|
|
714
735
|
}
|
|
715
736
|
while (this.accept(TokenType.Comma)) {
|
|
716
|
-
|
|
737
|
+
hasContent = false;
|
|
738
|
+
if (node.addChild(this._parseIdent())) {
|
|
739
|
+
hasContent = true;
|
|
740
|
+
}
|
|
741
|
+
if (this.accept(TokenType.Percentage)) {
|
|
742
|
+
hasContent = true;
|
|
743
|
+
}
|
|
744
|
+
if (!hasContent) {
|
|
717
745
|
this.restoreAtMark(pos);
|
|
718
746
|
return null;
|
|
719
747
|
}
|
|
@@ -1378,7 +1406,14 @@ export class Parser {
|
|
|
1378
1406
|
}
|
|
1379
1407
|
return null;
|
|
1380
1408
|
};
|
|
1381
|
-
node.addChild(this.try(tryAsSelector)
|
|
1409
|
+
let hasSelector = node.addChild(this.try(tryAsSelector));
|
|
1410
|
+
if (!hasSelector) {
|
|
1411
|
+
if (node.addChild(this._parseBinaryExpr()) &&
|
|
1412
|
+
this.acceptIdent('of') &&
|
|
1413
|
+
!node.addChild(this.try(tryAsSelector))) {
|
|
1414
|
+
return this.finish(node, ParseError.SelectorExpected);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1382
1417
|
if (!this.accept(TokenType.ParenthesisR)) {
|
|
1383
1418
|
return this.finish(node, ParseError.RightParenthesisExpected);
|
|
1384
1419
|
}
|
|
@@ -322,6 +322,37 @@ export class SelectorPrinting {
|
|
|
322
322
|
return !!this.cssDataManager.getPseudoElement("::" + match[1]);
|
|
323
323
|
}
|
|
324
324
|
selectorToSpecificityMarkedString(node) {
|
|
325
|
+
const calculateMostSpecificListItem = (childElements) => {
|
|
326
|
+
const specificity = new Specificity();
|
|
327
|
+
let mostSpecificListItem = new Specificity();
|
|
328
|
+
for (const containerElement of childElements) {
|
|
329
|
+
for (const childElement of containerElement.getChildren()) {
|
|
330
|
+
const itemSpecificity = calculateScore(childElement);
|
|
331
|
+
if (itemSpecificity.id > mostSpecificListItem.id) {
|
|
332
|
+
mostSpecificListItem = itemSpecificity;
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
else if (itemSpecificity.id < mostSpecificListItem.id) {
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
if (itemSpecificity.attr > mostSpecificListItem.attr) {
|
|
339
|
+
mostSpecificListItem = itemSpecificity;
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
else if (itemSpecificity.attr < mostSpecificListItem.attr) {
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
if (itemSpecificity.tag > mostSpecificListItem.tag) {
|
|
346
|
+
mostSpecificListItem = itemSpecificity;
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
specificity.id += mostSpecificListItem.id;
|
|
352
|
+
specificity.attr += mostSpecificListItem.attr;
|
|
353
|
+
specificity.tag += mostSpecificListItem.tag;
|
|
354
|
+
return specificity;
|
|
355
|
+
};
|
|
325
356
|
//https://www.w3.org/TR/selectors-3/#specificity
|
|
326
357
|
const calculateScore = (node) => {
|
|
327
358
|
const specificity = new Specificity();
|
|
@@ -343,7 +374,19 @@ export class SelectorPrinting {
|
|
|
343
374
|
break;
|
|
344
375
|
case nodes.NodeType.PseudoSelector:
|
|
345
376
|
const text = element.getText();
|
|
377
|
+
const childElements = element.getChildren();
|
|
346
378
|
if (this.isPseudoElementIdentifier(text)) {
|
|
379
|
+
if (text.match(/^::slotted/i) && childElements.length > 0) {
|
|
380
|
+
// The specificity of ::slotted() is that of a pseudo-element, plus the specificity of its argument.
|
|
381
|
+
// ::slotted() does not allow a selector list as its argument, but this isn't the right place to give feedback on validity.
|
|
382
|
+
// Reporting the most specific child will be correct for correct CSS and will be forgiving in case of mistakes.
|
|
383
|
+
specificity.tag++;
|
|
384
|
+
let mostSpecificListItem = calculateMostSpecificListItem(childElements);
|
|
385
|
+
specificity.id += mostSpecificListItem.id;
|
|
386
|
+
specificity.attr += mostSpecificListItem.attr;
|
|
387
|
+
specificity.tag += mostSpecificListItem.tag;
|
|
388
|
+
continue elementLoop;
|
|
389
|
+
}
|
|
347
390
|
specificity.tag++; // pseudo element
|
|
348
391
|
continue elementLoop;
|
|
349
392
|
}
|
|
@@ -352,38 +395,19 @@ export class SelectorPrinting {
|
|
|
352
395
|
continue elementLoop;
|
|
353
396
|
}
|
|
354
397
|
// the most specific child selector
|
|
355
|
-
if (text.match(/^:(not|has|is)/i) &&
|
|
356
|
-
let mostSpecificListItem =
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
mostSpecificListItem = itemSpecificity;
|
|
369
|
-
continue;
|
|
370
|
-
}
|
|
371
|
-
else if (itemSpecificity.id < mostSpecificListItem.id) {
|
|
372
|
-
continue;
|
|
373
|
-
}
|
|
374
|
-
if (itemSpecificity.attr > mostSpecificListItem.attr) {
|
|
375
|
-
mostSpecificListItem = itemSpecificity;
|
|
376
|
-
continue;
|
|
377
|
-
}
|
|
378
|
-
else if (itemSpecificity.attr < mostSpecificListItem.attr) {
|
|
379
|
-
continue;
|
|
380
|
-
}
|
|
381
|
-
if (itemSpecificity.tag > mostSpecificListItem.tag) {
|
|
382
|
-
mostSpecificListItem = itemSpecificity;
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
398
|
+
if (text.match(/^:(?:not|has|is)/i) && childElements.length > 0) {
|
|
399
|
+
let mostSpecificListItem = calculateMostSpecificListItem(childElements);
|
|
400
|
+
specificity.id += mostSpecificListItem.id;
|
|
401
|
+
specificity.attr += mostSpecificListItem.attr;
|
|
402
|
+
specificity.tag += mostSpecificListItem.tag;
|
|
403
|
+
continue elementLoop;
|
|
404
|
+
}
|
|
405
|
+
if (text.match(/^:(?:nth-child|nth-last-child|host|host-context)/i) && childElements.length > 0) {
|
|
406
|
+
// The specificity of :host() is that of a pseudo-class, plus the specificity of its argument.
|
|
407
|
+
// The specificity of :host-context() is that of a pseudo-class, plus the specificity of its argument.
|
|
408
|
+
// The specificity of an :nth-child() or :nth-last-child() selector is the specificity of the pseudo class itself (counting as one pseudo-class selector) plus the specificity of the most specific complex selector in its selector list argument.
|
|
409
|
+
specificity.attr++;
|
|
410
|
+
let mostSpecificListItem = calculateMostSpecificListItem(childElements);
|
|
387
411
|
specificity.id += mostSpecificListItem.id;
|
|
388
412
|
specificity.attr += mostSpecificListItem.attr;
|
|
389
413
|
specificity.tag += mostSpecificListItem.tag;
|