Skip to content

Commit 920bd3a

Browse files
committed
[css-color-5] Improve device-cmyk grammar, #9445
1 parent d24a6cf commit 920bd3a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

css-color-5/Overview.bs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,18 +2316,21 @@ or any other color or monochrome output device which has been characterized.
23162316
The ''device-cmyk()'' function allows authors to specify a color in this way:
23172317

23182318
<pre class='prod'>
2319-
<dfn>device-cmyk()</dfn> = device-cmyk( <<cmyk-component>>{4} [ / <<alpha-value>> | ''none'' ]? )
2319+
<dfn>device-cmyk()</dfn> = <<legacy-device-cmyk-syntax>> | <<modern-device-cmyk-syntax>>
2320+
<dfn>&lt;legacy-device-cmyk-syntax></dfn> = device-cmyk( <<number>>#{4} )
2321+
<dfn>&lt;modern-device-cmyk-syntax></dfn> = device-cmyk( <<cmyk-component>>{4} [ / <<alpha-value>> | ''none'' ]? )
23202322
<dfn>&lt;cmyk-component></dfn> = <<number>> | <<percentage>> | ''none''
23212323
</pre>
23222324

23232325
The arguments of the ''device-cmyk()'' function specify the cyan, magenta, yellow, and black components, in order,
2324-
as a number between 0 and 1 or a percentage between 0% and 100%.
2326+
as a number between 0 and 1
2327+
or, in the modern syntax, as a percentage between 0% and 100%.
23252328
These two usages are equivalent, and map to each other linearly.
23262329
Values less than 0 or 0%, or greater than 1 or 100%,
23272330
are not invalid;
23282331
instead, they are clamped to 0/0% or 1/100% at computed-value time.
23292332

2330-
The fifth argument specifies the alpha channel of the color.
2333+
In the modern syntax, the fifth argument specifies the alpha channel of the color.
23312334
It's interpreted identically to the fourth argument of the ''rgb()'' function.
23322335
If omitted, it defaults to ''100%''.
23332336

0 commit comments

Comments
 (0)