Skip to content

Commit 6a120ca

Browse files
committed
[css-color-4] id all the examples
1 parent c802635 commit 6a120ca

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

css-color-4/Overview.bs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Abstract: This specification describes CSS <<color>> values and properties for f
1515
Repository: w3c/csswg-drafts
1616
Ignored Terms: stacking context, double, octet
1717
Complain About: missing-example-ids true
18-
Complain About: broken-links true
18+
Complain About: broken-links false
1919
Complain About: accidental-2119 true
2020
</pre>
2121

@@ -124,7 +124,7 @@ Value Definitions</h3>
124124
but produce the same physical sensation,
125125
we say they have the same color.
126126

127-
<div class="example">For example a green leaf, a photograph of that leaf
127+
<div class="example" id="ex-cal-leaf">For example a green leaf, a photograph of that leaf
128128
displayed on a computer screen, and a print of that photograph,
129129
are all producing a green sensation by different means.
130130
If the screen and the printer are [=calibrated=],
@@ -141,7 +141,7 @@ Value Definitions</h3>
141141
or transformed from one colorspace to another,
142142
while looking the same.
143143

144-
<div class="example"><p>A leaf is measured
144+
<div class="example" id="ex-leaf-spectro"><p>A leaf is measured
145145
with a spectrophotometer
146146
and found to have the color
147147
<span class="swatch" style="--color: rgb(41.587%, 50.3670%, 36.664%)"></span> lch(51.2345% 21.2 130)
@@ -233,7 +233,7 @@ Foreground Color: the 'color' property</h2>
233233
There are several different ways to syntactically specify a given color.
234234
For example, to specify lime green:
235235

236-
<div class="example">
236+
<div class="example" id="ex-lime">
237237
<pre class="lang-css">
238238
em { color: <span class="swatch" style="--color: lime"></span>&nbsp;lime; } /* color keyword */
239239
em { color: <span class="swatch" style="--color: lime"></span>&nbsp;rgb(0 255 0); } /* RGB range 0-255 */
@@ -432,7 +432,7 @@ Resolving <<color>> Values</h3>
432432
does not preserve any mixed casing
433433
and is treated as being all lowercase.
434434

435-
<div class="example">
435+
<div class="example" id="ex-hsl-case">
436436
<p>For example, the first form below is treated as identical to the second:</p>
437437
<pre class="lang-css"><span class="swatch" style="--color: hsl(39 100% 50%)"></span> HsL(39 100% 50%)
438438

@@ -449,7 +449,7 @@ Resolving <<color>> Values</h3>
449449
and defaulting to opaque if unspecified).
450450

451451

452-
<div class="example">
452+
<div class="example" id="ex-hsl-computed">
453453
<p>For example, the computed value of</p>
454454
<pre class="lang-css"><span class="swatch" style="--color: rgb(255, 165, 0)"></span> hsl(38.824 100% 50%)</pre>
455455
<p>is</p>
@@ -467,7 +467,7 @@ Resolving <<color>> Values</h3>
467467
(as a <<number>>, not a <<percentage>>;
468468
and defaulting to opaque if unspecified).
469469

470-
<div class="example">
470+
<div class="example" id="ex-lch-computed">
471471
<p>For example, </p>
472472
<pre class="lang-css"><span class="swatch" style="--color: rgb(77.61% 36.34% 2.45%)"></span> lch(52.2345% 72.2 56.2 / 1)</pre>
473473
<p>would serialize as the string </p>
@@ -482,7 +482,7 @@ Resolving <<color>> Values</h3>
482482
(as a <<number>>, not a <<percentage>>;
483483
and defaulting to opaque if unspecified).
484484

485-
<div class="example">
485+
<div class="example" id="ex-p3-computed">
486486
<p>For example,</p>
487487
<pre class="lang-css"><span class="swatch" style="--color: goldenrod"></span> color(display-p3 0.823 0.6554 0.2537)</pre>
488488
<p>would serialize as the string</p>
@@ -506,7 +506,7 @@ Resolving <<color>> Values</h3>
506506
it must be converted
507507
as specified in [[#device-cmyk]].
508508

509-
<div class="example">
509+
<div class="example" id="ex-device-cmyk-used">
510510
<p>For example, </p>
511511
<pre class="lang-css"><span class="swatch" style="--color: rgb(93.124%, 44.098%, 57.491%)"></span> device-cmyk(0% 70% 20% 0%)</pre>
512512
<p>
@@ -570,7 +570,7 @@ This section updates and replaces that part of CSS Object Model, section
570570
with the "." character as decimal separator.
571571
Trailing zeroes must be omitted.
572572

573-
<div class="example">
573+
<div class="example" id="ex-alpha-trimzero">
574574
<p>For example, an alpha value of 70%
575575
will be serialized as the string
576576
"0.7".
@@ -587,7 +587,7 @@ This section updates and replaces that part of CSS Object Model, section
587587
(unless trailing zeroes have been removed).
588588
Values must be rounded, not truncated.
589589

590-
<div class="example">
590+
<div class="example" id="ex-alpha-round">
591591
<p>For example, an alpha value of 12.3456789%
592592
may be serialized as the strings
593593
"0.12" or "0.123" or "0.1234" or "0.12346"
@@ -632,7 +632,7 @@ This section updates and replaces that part of CSS Object Model, section
632632
from the alpha value.
633633

634634

635-
<div class="example">
635+
<div class="example" id="ex-rgb-ser-int-rgba">
636636
<p>For example, the serialized value of</p>
637637
<pre class="lang-css"><span class="swatch" style="--color: rgba(29, 164, 192, 0.95)"></span> rgb(29 164 192 / 95%)</pre>
638638
<p>is the string "rgba(29, 164, 192, 0.95)"</p>
@@ -664,7 +664,7 @@ This section updates and replaces that part of CSS Object Model, section
664664
are advised to update them to cope with
665665
<<number>>.
666666

667-
<div class="example">
667+
<div class="example" id="ex-rgb-number">
668668
<p>
669669
For example,</p>
670670
<pre class="lang-css"><span class="swatch" style="--color: rgb(57.28% 42.14% 51.46%)"></span> rgb(146.064 107.457 131.223)</pre>
@@ -674,7 +674,7 @@ This section updates and replaces that part of CSS Object Model, section
674674
is the string "rgb(146.06, 107.46, 131.2)".</p>
675675
</div>
676676

677-
<div class="example">
677+
<div class="example" id="ex-rgb-notrail">
678678
<p>The serialized value of </p>
679679
<pre class="lang-css"><span class="swatch" style="--color: goldenrod"></span> ''goldenrod''</pre>
680680
<p>is the string "rgb(218 165 32)"
@@ -1213,7 +1213,7 @@ System Colors</h3>
12131213
the <<system-color>> keywords also respond to light mode or dark mode changes.
12141214

12151215

1216-
<div class="example" id="LM-DM-links">
1216+
<div class="example" id="ex-LM-DM-links">
12171217
For example, traditional <span class="swatch" style="--color: blue"></span> blue link text is legible on a <span class="swatch" style="--color: #fff"></span> white background
12181218
(WCAG contrast 8.59:1, AAA pass)
12191219
but would not be legible on a <span class="swatch" style="--color: #000"></span> black background
@@ -1323,7 +1323,7 @@ System Colors</h3>
13231323
though possibly at a lower contrast rating,
13241324
over any of the backgrounds.
13251325

1326-
<div class="example" id="SystemCombo">
1326+
<div class="example" id="ex-SystemCombo">
13271327
For example, the system color combinations in the browser you are currently using:
13281328

13291329
<p>Canvas with CanvasText <span style="background-color:Canvas; color:CanvasText">CanvasText</span></p>
@@ -1508,7 +1508,7 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
15081508
it does not correspond to the visual perception of lightness
15091509
across hues.
15101510

1511-
<div class="example">
1511+
<div class="example" id="ex-hsl-sucks">
15121512
For example, <span class="swatch" style="--color: blue"></span>&nbsp;''blue''
15131513
is represented in HSL as
15141514
<span class="swatch" style="--color: blue"></span>&nbsp;''hsl(240deg 100% 50%)''
@@ -1530,7 +1530,7 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
15301530
colors appear bunched up in some areas
15311531
and widely spaced in others.
15321532

1533-
<div class="example">
1533+
<div class="example" id="ex-hsl-sucks-more">
15341534
For example, the pair of hues
15351535
<!--
15361536
hsl(220 100% 50%) 42.114139000774955, 97.39536874737148, 290.5815091930946
@@ -2444,7 +2444,7 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
24442444
and interpreted identically to the <<alpha-value>> in ''rgb()''.
24452445

24462446

2447-
<div class="example">
2447+
<div class="example" id="ex-lab-samples">
24482448
<pre class="lang-css">
24492449
<span class="swatch" style="--color: rgb(49.06% 13.87% 15.9%)"></span> lab(29.2345% 39.3825 20.0664);
24502450
<span class="swatch" style="--color: rgb(77.61% 36.34% 2.45%)"></span> lab(52.2345% 40.1645 59.9971);
@@ -2483,7 +2483,7 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
24832483
separated by a slash,
24842484
and interpreted identically to the <<alpha-value>> in ''rgb()''.
24852485

2486-
<div class="example">
2486+
<div class="example" id="ex-lch-samples">
24872487
<pre class="lang-css">
24882488
<span class="swatch" style="--color: rgb(49.06% 13.87% 15.9%)"></span> lch(29.2345% 44.2 27);
24892489
<span class="swatch" style="--color: rgb(77.61% 36.34% 2.45%)"></span> lch(52.2345% 72.2 56.2);
@@ -2598,7 +2598,7 @@ Profiled, Device-dependent Colors</h2>
25982598

25992599
These can be used without supplying a separate profile.
26002600

2601-
<div class='example'>
2601+
<div class='example' id="ex-profiles-colors">
26022602
This example specifies four profiled colors:
26032603
two are custom spaces
26042604
(for a SWOP-coated CMYK press,
@@ -2757,7 +2757,7 @@ Profiled, Device-dependent Colors</h2>
27572757
''color()'' represents <a>opaque black</a>.
27582758

27592759

2760-
<div class="example">
2760+
<div class="example" id="ex-2020-oog-p3">
27612761
This very intense lime color is in-gamut for rec.2020:
27622762
<pre class="lang-css">color(rec2020 0.42053 0.979780 0.00579);</pre>
27632763
in LCH, that color is
@@ -2777,7 +2777,7 @@ Profiled, Device-dependent Colors</h2>
27772777
produced automatically by gamut mapping.
27782778
</div>
27792779

2780-
<div class="example">
2780+
<div class="example" id="ex-2020-fallback">
27812781
The same color as the previous example is now specified with a fallback
27822782
<pre class="lang-css">color(rec2020 0.42053 0.979780 0.00579, color(display-p3(0 1 0)));</pre>
27832783
On a display-p3 screen,
@@ -2786,7 +2786,7 @@ Profiled, Device-dependent Colors</h2>
27862786
the fallback color will be used.
27872787
</div>
27882788

2789-
<div class="example">
2789+
<div class="example" id="ex-2020-two-fallbacks">
27902790
An intense green is provided in prophoto-rgb space.
27912791
It has a first fallback, which is the same color in display-p3
27922792
in case prophoto is unsupported. The color is in gamut of display-p3.
@@ -2795,7 +2795,7 @@ Profiled, Device-dependent Colors</h2>
27952795
<pre class="lang-css">color(prophoto-rgb 0.4835 0.9167 0.2188, display-p3 0.3499 0.9800 0.1399, rgb(33.44% 96.68% 21.07%))</pre>
27962796
</div>
27972797

2798-
<div class="example">
2798+
<div class="invalid example" id="ex-profoto-bad">
27992799
Same as the previous example, but with a typo!
28002800
An intense green is provided in profoto-rgb space (which doesn't exist).
28012801
Ths makes it invalid, so we go to the first fallback, which is the same color in display-p3.
@@ -3058,7 +3058,7 @@ Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'',
30583058
but can occur as a result of chromatic adaptation,
30593059
and likewise must not be clamped.
30603060

3061-
<div class="example">
3061+
<div class="example" id="ex-xyz">
30623062
These are exactly equivalent:
30633063

30643064
<pre class="lang-css">
@@ -3074,7 +3074,7 @@ Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'',
30743074
representing the L, a, and b values.
30753075
The meaning and valid ranges are <a href="#specifying-lab-lch">the same as the lab() function</a>.
30763076

3077-
<div class="example">
3077+
<div class="example" id="ex-lab-in-color">
30783078
These are exactly equivalent:
30793079

30803080
<pre class="lang-css">
@@ -3265,7 +3265,7 @@ corresponding to the combination of
32653265
inks, paper, total ink coverage and equipment
32663266
you will use.
32673267

3268-
<div class="example">
3268+
<div class="example" id="ex-fogra">
32693269
For example, using offset printing to ISO 12647-2:2004 / Amd 1:2007
32703270
using the FOGRA39 characterisation data
32713271
on 115gsm coated paper
@@ -3357,7 +3357,7 @@ can proceed as normal.
33573357
</figure>
33583358

33593359

3360-
<div class="example">
3360+
<div class="example" id="ex-swop5v2">
33613361
This example is using offset printing to ISO 12647-2:2004
33623362
using the CGATS/SWOP TR005 2007 characterisation data
33633363
on grade 5 paper
@@ -3393,7 +3393,7 @@ Fallback colors can be specified,
33933393
for example if the specified CMYK color is known
33943394
to be outside the sRGB gamut.
33953395

3396-
<div class="example">
3396+
<div class="example" id="ex-fogra39-fallback-mq">
33973397
This example uses the same FOGRA39 setup as before,
33983398
but specifies a bright green which is outside the sRGB gamut.
33993399
It is, however, inside the display-p3 gamut.
@@ -3473,7 +3473,7 @@ Array(3) [ 0.16582655785857967, 0.6147848214649991, 0.3532666045888559 ]
34733473

34743474
Colors are not restricted to four inks (CMYK). For example, wide-gamut 7 Color ink sets can be used.
34753475

3476-
<div class="example">This example uses the beta FOGRA55 dataset for KCMYOGV seven-color printing.
3476+
<div class="example" id="ex-fogra55beta-7color">This example uses the beta FOGRA55 dataset for KCMYOGV seven-color printing.
34773477
Four of the inks - black, cyan, magenta, and yellow - are the same as,
34783478
and give the same results as, the FOGRA51 set.
34793479
The other three inks are:
@@ -3587,7 +3587,7 @@ Device-dependent CMYK Colors: the ''device-cmyk()'' function</h2>
35873587
</li>
35883588
</ol>
35893589

3590-
<div class='example'>
3590+
<div class='example' id="ex-device-cmyk-naive">
35913591
For example, with no ''@color-profile'' and no fallback specified,
35923592
the following colors are equivalent, using the naive conversion.
35933593

@@ -3598,7 +3598,7 @@ Device-dependent CMYK Colors: the ''device-cmyk()'' function</h2>
35983598
</pre>
35993599
</div>
36003600

3601-
<div class='example'>
3601+
<div class='example' id="ex-device-cmyk-colprof">
36023602
With the ''@color-profile'' specified as in the example stylesheet,
36033603
the following colors are equivalent, using colorimetric conversion.
36043604

0 commit comments

Comments
 (0)