Skip to content

Commit 397906c

Browse files
skyclouds2001bsmth
andauthored
feat(css): Add missing css color() function (#858)
feat(css): Add missing css `color()` function Co-authored-by: Brian Smith <[email protected]>
1 parent 0435f3a commit 397906c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

css/functions.json

+8
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@
119119
"status": "standard",
120120
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/clamp"
121121
},
122+
"color()": {
123+
"syntax": "color( [from <color>]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )",
124+
"groups": [
125+
"CSS Color"
126+
],
127+
"status": "standard",
128+
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/color_value/color"
129+
},
122130
"conic-gradient()": {
123131
"syntax": "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )",
124132
"groups": [

css/syntaxes.json

+21
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@
146146
"color": {
147147
"syntax": "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hwb()> | <lab()> | <lch()> | <oklab()> | <oklch()> | <color()> | <hex-color> | <named-color> | <system-color> | <deprecated-system-color> | currentcolor | transparent"
148148
},
149+
"color()": {
150+
"syntax": "color( [from <color>]? <colorspace-params> [ / [ <alpha-value> | none ] ]? )"
151+
},
149152
"color-interpolation-method": {
150153
"syntax": "in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? ]"
151154
},
@@ -161,6 +164,9 @@
161164
"color-stop-list": {
162165
"syntax": "[ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>"
163166
},
167+
"colorspace-params": {
168+
"syntax": "[<custom-params> | <predefined-rgb-params> | <xyz-params>]"
169+
},
164170
"combinator": {
165171
"syntax": "'>' | '+' | '~' | [ '||' ]"
166172
},
@@ -239,6 +245,9 @@
239245
"cubic-bezier-timing-function": {
240246
"syntax": "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"
241247
},
248+
"custom-params": {
249+
"syntax": "<dashed-ident> [ <number> | <percentage> | none ]+"
250+
},
242251
"dasharray": {
243252
"syntax": "[ [ <length-percentage> | <number> ]+ ]#"
244253
},
@@ -674,6 +683,12 @@
674683
"pow()": {
675684
"syntax": "pow( <calc-sum>, <calc-sum> )"
676685
},
686+
"predefined-rgb": {
687+
"syntax": "srgb | srgb-linear | display-p3 | a98-rgb | prophoto-rgb | rec2020"
688+
},
689+
"predefined-rgb-params": {
690+
"syntax": "<predefined-rgb> [ <number> | <percentage> | none ]{3}"
691+
},
677692
"pseudo-class-selector": {
678693
"syntax": "':' <ident-token> | ':' <function-token> <any-value> ')'"
679694
},
@@ -976,5 +991,11 @@
976991
},
977992
"wq-name": {
978993
"syntax": "<ns-prefix>? <ident-token>"
994+
},
995+
"xyz": {
996+
"syntax": "xyz | xyz-d50 | xyz-d65"
997+
},
998+
"xyz-params": {
999+
"syntax": "<xyz> [ <number> | <percentage> | none ]{3}"
9791000
}
9801001
}

0 commit comments

Comments
 (0)