Skip to content

Commit 82308a8

Browse files
committed
css-syntax-patches-for-csstree: radial size
1 parent b2e30d2 commit 82308a8

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

packages/css-syntax-patches-for-csstree/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Unreleased (patch)
44

55
- Update `@webref/css` to [`v8.1.1`](https://github.com/w3c/webref/releases/tag/%40webref%2Fcss%408.1.1)
6+
- Patch `<radial-size>` to have correct definitions for both `circle()` and `ellipse()`
67

78
### 1.0.20
89

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@
557557
"calc-size()": "calc-size( [ [ <calc-size-basis> , [ <calc-sum> | size ] ] | [ any , <calc-sum> ] ] )",
558558
"calc-value": "<number> | <dimension> | <percentage> | <calc-keyword> | ( <calc-sum> )",
559559
"cf-image": "[ <image> | <color> ] && <percentage [0,100]>?",
560-
"circle()": "circle( <radial-size>? [ at <position> ]? )",
560+
"circle()": "circle( [ <radial-extent> | <length-percentage [0,∞]> ]? [ at <position> ]? )",
561561
"clamp()": "clamp( [ <calc-sum> | none ] , <calc-sum> , [ <calc-sum> | none ] )",
562562
"color": "<color-base> | currentColor | <system-color> | <contrast-color()> | <device-cmyk()> | <light-dark()> | <-non-standard-color>",
563563
"color-font-tech": "[ color-COLRv0 | color-COLRv1 | color-SVG | color-sbix | color-CBDT ]",
@@ -604,7 +604,7 @@
604604
"dynamic-range-limit-mix()": "dynamic-range-limit-mix( [ <'dynamic-range-limit'> && <percentage [0,100]> ]#{2,} )",
605605
"easing-function": "<linear-easing-function> | <cubic-bezier-easing-function> | <step-easing-function>",
606606
"element()": "element( <id-selector> )",
607-
"ellipse()": "ellipse( [ [ <radial-size>{2} ]? [ at <position> ]? ] )",
607+
"ellipse()": "ellipse( <radial-size>? [ at <position> ]? )",
608608
"env()": "env( <custom-ident> <integer [0,∞]>* , <declaration-value>? )",
609609
"event-trigger-event": "activate | click | touch | dblclick | keypress( <string> ) | . . .",
610610
"fade()": "fade( [ <length-percentage> ] )",
@@ -760,7 +760,7 @@
760760
"radial-gradient-syntax": "[ [ [ <radial-shape> || <radial-size> ]? [ at <position> ]? ] || <color-interpolation-method> ]? , <color-stop-list>",
761761
"radial-gradient()": "radial-gradient( [ <radial-gradient-syntax> ] )",
762762
"radial-shape": "circle | ellipse",
763-
"radial-size": "<radial-extent> | <length [0,∞]> | <length-percentage [0,∞]>",
763+
"radial-size": "<radial-extent>{1,2} | <length [0,∞]> | <length-percentage [0,∞]>{2}",
764764
"random-item-args": "random-item( <declaration-value> , [ <declaration-value>? ]# )",
765765
"random-item()": "random-item( <random-value-sharing> , [ <declaration-value>? ]# )",
766766
"random-value-sharing": "[ [ auto | <dashed-ident> ] || element-shared ] | fixed <number [0,1]>",

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

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,36 @@
795795
"comment": "",
796796
"syntax-b": "circle( [ <shape-radius> ]? [ at <position> ]? )",
797797
"syntax-a": "circle( <radial-size>? [ at <position> ]? )",
798-
"syntax-m": "circle( <radial-size>? [ at <position> ]? )",
798+
"syntax-m": "circle( [ <radial-extent> | <length-percentage [0,∞]> ]? [ at <position> ]? )",
799799
"tests": {
800-
"passing": [],
801-
"failing": []
800+
"passing": [
801+
{
802+
"property": "clip-path",
803+
"value": "circle(50px)"
804+
},
805+
{
806+
"property": "clip-path",
807+
"value": "circle(6rem at right center)"
808+
},
809+
{
810+
"property": "clip-path",
811+
"value": "circle(10% at 2rem 90%)"
812+
},
813+
{
814+
"property": "clip-path",
815+
"value": "circle(closest-side at 5rem 6rem)"
816+
},
817+
{
818+
"property": "clip-path",
819+
"value": "circle(farthest-side)"
820+
}
821+
],
822+
"failing": [
823+
{
824+
"property": "clip-path",
825+
"value": "circle(50px 40px at center)"
826+
}
827+
]
802828
}
803829
},
804830
"clamp()": {
@@ -1558,7 +1584,7 @@
15581584
"comment": "",
15591585
"syntax-b": "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )",
15601586
"syntax-a": "ellipse( <radial-size>? [ at <position> ]? )",
1561-
"syntax-m": "ellipse( [ [ <radial-size>{2} ]? [ at <position> ]? ] )",
1587+
"syntax-m": "ellipse( <radial-size>? [ at <position> ]? )",
15621588
"tests": {
15631589
"passing": [],
15641590
"failing": []
@@ -3909,7 +3935,12 @@
39093935
"syntax-a": "[ [ [ <radial-shape> || <radial-size> ]? [ at <position> ]? ] || <color-interpolation-method> ]? , <color-stop-list>",
39103936
"syntax-m": "[ [ [ <radial-shape> || <radial-size> ]? [ at <position> ]? ] || <color-interpolation-method> ]? , <color-stop-list>",
39113937
"tests": {
3912-
"passing": [],
3938+
"passing": [
3939+
{
3940+
"property": "background",
3941+
"value": "radial-gradient(circle at 100%,#333333,#333333 50%,#eeeeee 75%,#333333 75%)"
3942+
}
3943+
],
39133944
"failing": []
39143945
}
39153946
},
@@ -3940,7 +3971,7 @@
39403971
"comment": "https://github.com/w3c/csswg-drafts/issues/10812",
39413972
"syntax-b": "",
39423973
"syntax-a": "<radial-extent> | <length [0,∞]> | <length-percentage [0,∞]>{2}",
3943-
"syntax-m": "<radial-extent> | <length [0,∞]> | <length-percentage [0,∞]>",
3974+
"syntax-m": "<radial-extent>{1,2} | <length [0,∞]> | <length-percentage [0,∞]>{2}",
39443975
"tests": {
39453976
"passing": [
39463977
{

0 commit comments

Comments
 (0)