Skip to content

Commit 3ef889d

Browse files
committed
[css-color-4] Allow percent as well as float 0.0 to 1.0 in color() args w3c#3450
1 parent f93f634 commit 3ef889d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

css-color-4/Overview.bs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,7 @@ Profiled, Device-dependent Colors</h2>
20112011
Its syntax is:
20122012

20132013
<pre class='prod'>
2014-
<dfn>color()</dfn> = color( [ <<ident>>? [ <<number>>+ | <<string>> ] [ / <<alpha-value>> ]? ]# , <<color>>? )
2014+
<dfn>color()</dfn> = color( [ <<ident>>? [ <<number-percentage>>+ | <<string>> ] [ / <<alpha-value>> ]? ]# , <<color>>? )
20152015
</pre>
20162016

20172017
The color function takes one or more comma-separated arguments,
@@ -2030,16 +2030,16 @@ Profiled, Device-dependent Colors</h2>
20302030
If the <<ident>> names a non-existent colorspace,
20312031
this argument represents an <a>invalid color</a>.
20322032

2033-
* Either one or more <<number>>s providing the parameter values that the colorspace takes,
2033+
* Either one or more <<number>>s or <<percentage>>s providing the parameter values that the colorspace takes,
20342034
or a <<string>> giving the name of a color defined by the colorspace.
20352035

20362036
<dl class=switch>
20372037
<dt>If the colorspace takes numeric parameters
20382038
<dd>
2039-
If more <<number>>s are provided than parameters that the colorspace takes,
2039+
If more <<number>>s or <<percentage>>s are provided than parameters that the colorspace takes,
20402040
the excess <<number>>s at the end are ignored.
20412041

2042-
If less <<number>>s are provided than parameters that the colorspace takes,
2042+
If less <<number>>s or <<percentage>>s are provided than parameters that the colorspace takes,
20432043
the missing parameters default to ''0''.
20442044
(This is particularly convenient for multichannel printers
20452045
where the additional inks are spot colors or varnishes
@@ -2049,7 +2049,7 @@ Profiled, Device-dependent Colors</h2>
20492049
this argument represents an <a>invalid color</a>.
20502050
<dt>If the colorspace defines named colors
20512051
<dd>
2052-
If <<number>>s are provided,
2052+
If <<number>>s or <<percentage>>s are provided,
20532053
or a <<string>> is provided that doesn't match any of the color names
20542054
defined by the colorspace,
20552055
this argument represents an <a>invalid color</a>.

0 commit comments

Comments
 (0)