Skip to content

Commit 70d51c3

Browse files
committed
restore tests
1 parent fc094ca commit 70d51c3

3 files changed

Lines changed: 248 additions & 21 deletions

File tree

packages/css-syntax-patches-for-csstree/dist/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@
571571
"content-level": "element | content | text | <attr()> | <counter>",
572572
"content-list": "[ <string> | contents | <image> | <counter> | <quote> | <target> | <leader()> | <attr()> | <string()> | <content()> ]+",
573573
"content()": "content( [ text | before | after | first-letter | marker ]? )",
574-
"contrast-color()": "contrast-color( [ [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>? ] | [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast> , <color># ] ] )",
574+
"contrast-color()": "contrast-color( <color> )",
575575
"contrast()": "contrast( [ <number> | <percentage> ]? )",
576576
"control-point": "[ <position> | <relative-control-point> ]",
577577
"control-value()": "control-value( <type>? )",

packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-properties.json

Lines changed: 90 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@
66
"syntax-a": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ] | anchor-center | dialog",
77
"syntax-m": "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ] | anchor-center | dialog",
88
"tests": {
9-
"passing": [],
9+
"passing": [
10+
{
11+
"value": "normal"
12+
},
13+
{
14+
"value": "stretch"
15+
},
16+
{
17+
"value": "anchor-center"
18+
}
19+
],
1020
"failing": []
1121
}
1222
},
@@ -17,7 +27,17 @@
1727
"syntax-a": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position> | anchor-center | dialog",
1828
"syntax-m": "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position> | anchor-center | dialog",
1929
"tests": {
20-
"passing": [],
30+
"passing": [
31+
{
32+
"value": "normal"
33+
},
34+
{
35+
"value": "stretch"
36+
},
37+
{
38+
"value": "anchor-center"
39+
}
40+
],
2141
"failing": []
2242
}
2343
},
@@ -102,7 +122,26 @@
102122
"syntax-a": "none | auto | base | base-select | <compat-auto> | <compat-special> | base",
103123
"syntax-m": "none | auto | base | base-select | <compat-auto> | <compat-special> | base",
104124
"tests": {
105-
"passing": [],
125+
"passing": [
126+
{
127+
"value": "none"
128+
},
129+
{
130+
"value": "auto"
131+
},
132+
{
133+
"value": "textfield"
134+
},
135+
{
136+
"value": "base"
137+
},
138+
{
139+
"value": "menulist-button"
140+
},
141+
{
142+
"value": "searchfield"
143+
}
144+
],
106145
"failing": []
107146
}
108147
},
@@ -378,8 +417,22 @@
378417
"syntax-a": "no-ellipsis | auto | <string>",
379418
"syntax-m": "no-ellipsis | auto | <string>",
380419
"tests": {
381-
"passing": [],
382-
"failing": []
420+
"passing": [
421+
{
422+
"value": "no-ellipsis"
423+
},
424+
{
425+
"value": "auto"
426+
},
427+
{
428+
"value": "':::'"
429+
}
430+
],
431+
"failing": [
432+
{
433+
"value": "foo"
434+
}
435+
]
383436
}
384437
},
385438
"block-step": {
@@ -1617,7 +1670,11 @@
16171670
"syntax-a": "rect( <top> , <right> , <bottom> , <left> ) | auto",
16181671
"syntax-m": "rect( <top> , <right> , <bottom> , <left> ) | auto",
16191672
"tests": {
1620-
"passing": [],
1673+
"passing": [
1674+
{
1675+
"value": "rect(1px, 2px, 3px, 4px)"
1676+
}
1677+
],
16211678
"failing": []
16221679
}
16231680
},
@@ -3252,7 +3309,14 @@
32523309
"syntax-a": "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ] | anchor-center | dialog",
32533310
"syntax-m": " | anchor-center | dialog",
32543311
"tests": {
3255-
"passing": [],
3312+
"passing": [
3313+
{
3314+
"value": "anchor-center"
3315+
},
3316+
{
3317+
"value": "normal"
3318+
}
3319+
],
32563320
"failing": []
32573321
}
32583322
},
@@ -6043,8 +6107,25 @@
60436107
"syntax-a": "<number [0,∞]> | <percentage [0,∞]>",
60446108
"syntax-m": "normal | reset | <number [0,∞]> | <percentage [0,∞]>",
60456109
"tests": {
6046-
"passing": [],
6047-
"failing": []
6110+
"passing": [
6111+
{
6112+
"value": "normal"
6113+
},
6114+
{
6115+
"value": "reset"
6116+
},
6117+
{
6118+
"value": "10%"
6119+
},
6120+
{
6121+
"value": "10"
6122+
}
6123+
],
6124+
"failing": [
6125+
{
6126+
"value": "10px"
6127+
}
6128+
]
60486129
}
60496130
}
60506131
}

packages/css-syntax-patches-for-csstree/patches/webref-over-csstree-types.json

Lines changed: 157 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,66 @@
496496
"syntax-a": "<inset()> | <rect()> | <xywh()>",
497497
"syntax-m": "<inset()> | rect( [ <length-percentage> | auto ]{4} [ round <'border-radius'> ]? ) | xywh( <length-percentage>{2} <length-percentage [0,∞]>{2} [ round <'border-radius'> ]? )",
498498
"tests": {
499-
"passing": [],
500-
"failing": []
499+
"passing": [
500+
{
501+
"property": "clip-path",
502+
"value": "inset(22% 12% 15px 35px)"
503+
},
504+
{
505+
"property": "clip-path",
506+
"value": "circle(6rem at 12rem 8rem)"
507+
},
508+
{
509+
"property": "clip-path",
510+
"value": "ellipse(115px 55px at 50% 40%)"
511+
},
512+
{
513+
"property": "clip-path",
514+
"value": "polygon(50% 2.4%, 34.5% 33.8%, 0% 38.8%, 25% 63.1%, 19.1% 97.6%, 50% 81.3%, 80.9% 97.6%, 75% 63.1%, 100% 38.8%, 65.5% 33.8%)"
515+
},
516+
{
517+
"property": "clip-path",
518+
"value": "path('M 50,245 A 160,160 0,0,1 360,120 z')"
519+
},
520+
{
521+
"property": "offset-path",
522+
"value": "rect(1px 2px 3px 4px)"
523+
},
524+
{
525+
"property": "offset-path",
526+
"value": "rect(auto auto auto auto)"
527+
},
528+
{
529+
"property": "offset-path",
530+
"value": "rect(0 1% auto 3% round 0 1px)"
531+
}
532+
],
533+
"failing": [
534+
{
535+
"property": "clip-path",
536+
"value": "inset(foo)"
537+
},
538+
{
539+
"property": "offset-path",
540+
"value": "rect(1px)"
541+
},
542+
{
543+
"property": "offset-path",
544+
"value": "rect(1px 2px)"
545+
},
546+
{
547+
"property": "offset-path",
548+
"value": "rect(1px 2px 3px)"
549+
},
550+
{
551+
"property": "offset-path",
552+
"value": "rect(1px 2px 3px 4px 5px)"
553+
},
554+
{
555+
"property": "offset-path",
556+
"value": "rect(1ms 2ms 3ms 4ms)"
557+
}
558+
]
501559
}
502560
},
503561
"bg-clip": {
@@ -730,8 +788,18 @@
730788
"syntax-a": "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <ictcp()> | <jzazbz()> | <jzczhz()> | <alpha()> | <color()>",
731789
"syntax-m": "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <ictcp()> | <jzazbz()> | <jzczhz()> | <alpha()> | <color()>",
732790
"tests": {
733-
"passing": [],
734-
"failing": []
791+
"passing": [
792+
{
793+
"property": "color",
794+
"value": "ictcp(0.5393 -0.2643 -0.0625)"
795+
}
796+
],
797+
"failing": [
798+
{
799+
"property": "color",
800+
"value": "ictcp(foo -0.2643 -0.0625)"
801+
}
802+
]
735803
}
736804
},
737805
"color-interpolate()": {
@@ -995,8 +1063,26 @@
9951063
"syntax-a": "[ <string> | <image> | <attr()> | contents | <quote> | <leader()> | <target> | <string()> | <content()> | <counter> ]+",
9961064
"syntax-m": "[ <string> | contents | <image> | <counter> | <quote> | <target> | <leader()> | <attr()> | <string()> | <content()> ]+",
9971065
"tests": {
998-
"passing": [],
999-
"failing": []
1066+
"passing": [
1067+
{
1068+
"property": "content",
1069+
"value": "'a'"
1070+
},
1071+
{
1072+
"property": "content",
1073+
"value": "'a' 'b'"
1074+
},
1075+
{
1076+
"property": "content",
1077+
"value": "'a' counter(foo)"
1078+
}
1079+
],
1080+
"failing": [
1081+
{
1082+
"property": "content",
1083+
"value": "10"
1084+
}
1085+
]
10001086
}
10011087
},
10021088
"content()": {
@@ -1024,10 +1110,36 @@
10241110
"comment": "",
10251111
"syntax-b": "",
10261112
"syntax-a": "contrast-color( [ [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>? ] | [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast> , <color># ] ] )",
1027-
"syntax-m": "contrast-color( [ [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast>? ] | [ <color> && [ tbd-fg | tbd-bg ] && <target-contrast> , <color># ] ] )",
1113+
"syntax-m": "contrast-color( <color> )",
10281114
"tests": {
1029-
"passing": [],
1030-
"failing": []
1115+
"passing": [
1116+
{
1117+
"property": "color",
1118+
"value": "contrast-color(red)"
1119+
}
1120+
],
1121+
"failing": [
1122+
{
1123+
"property": "color",
1124+
"value": "contrast-color()"
1125+
},
1126+
{
1127+
"property": "color",
1128+
"value": "contrast-color(red max)"
1129+
},
1130+
{
1131+
"property": "color",
1132+
"value": "contrast-color(max)"
1133+
},
1134+
{
1135+
"property": "color",
1136+
"value": "contrast-color(max max)"
1137+
},
1138+
{
1139+
"property": "color",
1140+
"value": "contrast-color(red red)"
1141+
}
1142+
]
10311143
}
10321144
},
10331145
"contrast()": {
@@ -3558,8 +3670,42 @@
35583670
"syntax-a": "ray( [ <angle> && <ray-size>? && contain? && [ at <position> ]? ] )",
35593671
"syntax-m": "ray( [ <angle> && <ray-size>? && contain? && [ at <position> ]? ] )",
35603672
"tests": {
3561-
"passing": [],
3562-
"failing": []
3673+
"passing": [
3674+
{
3675+
"property": "offset-path",
3676+
"value": "ray(45deg)"
3677+
},
3678+
{
3679+
"property": "offset-path",
3680+
"value": "ray(200deg contain)"
3681+
},
3682+
{
3683+
"property": "offset-path",
3684+
"value": "ray(contain 200deg)"
3685+
},
3686+
{
3687+
"property": "offset-path",
3688+
"value": "ray(50deg closest-corner contain at 100px 20px)"
3689+
},
3690+
{
3691+
"property": "offset-path",
3692+
"value": "ray(50deg closest-corner contain)"
3693+
}
3694+
],
3695+
"failing": [
3696+
{
3697+
"property": "offset-path",
3698+
"value": "ray()"
3699+
},
3700+
{
3701+
"property": "offset-path",
3702+
"value": "ray(50deg closest-corner contain at)"
3703+
},
3704+
{
3705+
"property": "offset-path",
3706+
"value": "ray(50hz)"
3707+
}
3708+
]
35633709
}
35643710
},
35653711
"rectangular-color-space": {

0 commit comments

Comments
 (0)