Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(css): add missing css color-mix() function #857

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion css/functions.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,21 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/clamp"
},
"color()": {
"syntax": "color( [from <color>]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )",
"syntax": "color( [ from <color> ]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )",
"groups": [
"CSS Color"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/color_value/color"
},
"color-mix()": {
"syntax": "color-mix( <color-interpolation-method> , [ <color> && <percentage [0,100]>? ]#{2})",
"groups": [
"CSS Color"
],
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/color_value/color-mix"
},
"conic-gradient()": {
"syntax": "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )",
"groups": [
Expand Down
8 changes: 7 additions & 1 deletion css/syntaxes.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@
"syntax": "color( [from <color>]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )"
},
"color-interpolation-method": {
"syntax": "in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ]"
"syntax": "in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? | <custom-color-space> ]"
},
"color-mix()": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose in duplicating the color-mix() entry here, also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is simply the current behavior, see #811, to have css functions both in syntaxes.json and functions.json

change it may bring break change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is again another case for mirroring members

"syntax": "color-mix( <color-interpolation-method> , [ <color> && <percentage [0,100]>? ]#{2})"
},
"color-stop": {
"syntax": "<color-stop-length> | <color-stop-angle>"
Expand Down Expand Up @@ -245,6 +248,9 @@
"cubic-bezier-timing-function": {
"syntax": "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"
},
"custom-color-space": {
"syntax": "<dashed-ident>"
},
"custom-params": {
"syntax": "<dashed-ident> [ <number> | <percentage> | none ]+"
},
Expand Down
Loading