Skip to content

Commit 73f63f0

Browse files
committed
[css-color-4] General note about legacy color syntax, w3c#6911
1 parent cb86f71 commit 73f63f0

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

css-color-4/Overview.bs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,32 @@ Representing Colors: the <<color>> type</h2>
522522
but fully transparent--
523523
i.e. <nobr>''rgb(0 0 0 / 0%)''</nobr>.
524524

525+
All of the <<color>> syntactic forms
526+
defined in this specification
527+
use space, not comma,
528+
to separate the color components.
529+
They also use a solidus ("/")
530+
to separate an optional alpha term
531+
from the color components.
532+
533+
For Web compatibility,
534+
<<color>> syntactic forms
535+
defined in earlier levels of this specification
536+
also support
537+
<dfn export>legacy color syntax</dfn>
538+
which has the following differences:
539+
540+
* color components are separated by comma-whitespace
541+
* non-opaque forms use a separate notation
542+
(for example ''hsla()'' rather than ''hsl()'')
543+
* minimum required precision is lower, 8 bits per component
544+
545+
For the syntactic forms introduced
546+
in this or subsequent levels,
547+
where there is no Web compatibility issue,
548+
<a>legacy color syntax</a> is not supported,
549+
and attempting to use it is an error.
550+
525551
<h3 id="hue-syntax">The <<hue>> syntax</h3>
526552

527553
Hue is represented as an angle of the color circle

0 commit comments

Comments
 (0)