Skip to content

Commit

Permalink
feat(css): add missing css color-mix() function (#857)
Browse files Browse the repository at this point in the history
* feat(css): add missing css `color-mix()` function

* add the missing syntax
  • Loading branch information
skyclouds2001 authored Jan 10, 2025
1 parent 397906c commit 3fe902e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
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()": {
"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

0 comments on commit 3fe902e

Please sign in to comment.