Skip to content

Commit 6c885ec

Browse files
author
Chris Lilley
committed
[css-color-4] Define and export term "modern color syntax"
1 parent 72189dc commit 6c885ec

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

css-color-4/Overview.bs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ div.example {
131131
overflow: visible;
132132
}
133133
div.example>a.self-link::before {
134-
content: "¶";
134+
content: "¶";
135135
}
136136
</style>
137137

@@ -881,21 +881,27 @@ Representing Colors: the <<color>> type</h2>
881881
are [=cylindrical polar color=] representations using a <<hue>> angle;
882882
the other [=color functions=] use [=rectangular orthogonal color=] representations.
883883

884+
<h4 id="color-syntax-modern">
885+
Modern (Space-separated) Color Function Syntax</h4>
886+
884887
All of the <<absolute-color-function>> syntactic forms
885888
defined in this specification
886-
use space, not comma,
887-
to separate the color components.
888-
They also use a solidus ("/")
889-
to separate an optional alpha term
890-
from the color components.
889+
use the <dfn export>modern color syntax</dfn>,
890+
meaning:
891+
892+
* color components are separated by whitespace
893+
* the optional alpha term is separated by a solidus ("/")
894+
* minimum required precision <a href="#serializing-color-values">when serializing</a> is defined,
895+
and may be greater than 8 bits per component
896+
* the ''none'' value is allowed, to represent [=missing components=]
891897

892-
<div class=example id="example-generic-syntax">
898+
<div class=example id="example-modern-syntax">
893899
<p>The following represents a saturated sRGB red that is 50% opaque:
894900
<pre>rgb(100% 0% 0% / 50%)</pre>
895901
</div>
896902

897903
<h4 id="color-syntax-legacy">
898-
Legacy Comma-separated Color Function Syntax</h4>
904+
Legacy (Comma-separated) Color Function Syntax</h4>
899905

900906
For Web compatibility,
901907
the syntactic forms
@@ -910,6 +916,8 @@ Legacy Comma-separated Color Function Syntax</h4>
910916
(optionally preceded and/or followed by whitespace)
911917
* non-opaque forms use a separate notation
912918
(for example ''hsla()'' rather than ''hsl()'')
919+
and the alpha term is separated by commas
920+
(optionally preceded and/or followed by whitespace)
913921
* minimum required precision is lower, 8 bits per component
914922
* the ''none'' value is not allowed
915923

0 commit comments

Comments
 (0)