@@ -20,6 +20,7 @@ Ignored Terms: <offset>, background positioning area, border image area, <meetor
2020Ignored Vars : H, P
2121Include Can I Use Panels : yes
2222Default Highlight : css
23+ Complain About : missing-example-ids true
2324WPT Path Prefix : css/css-images/
2425WPT Display : open
2526</pre>
@@ -307,7 +308,7 @@ Resolution/Type Negotiation: the ''image-set()'' notation {#image-set-notation}
307308 over the lifetime of the page,
308309 if the criteria used to determine which option to choose change significantly enough to make it worthwhile in the UA's estimation.
309310
310- <div class='example'>
311+ <div class='example' id='ex-image-set' >
311312 This example shows how to use ''image-set()'' to provide an image in three versions:
312313 a "normal" version,
313314 a "high-res" version,
@@ -321,7 +322,7 @@ Resolution/Type Negotiation: the ''image-set()'' notation {#image-set-notation}
321322 </pre>
322323 </div>
323324
324- <div class='example'>
325+ <div class='example' id='ex-image-set-type' >
325326 This example shows use of the ''type()'' function
326327 to serve multiple versions of the same image
327328 in both new, higher-quality formats,
@@ -345,7 +346,7 @@ Resolution/Type Negotiation: the ''image-set()'' notation {#image-set-notation}
345346 and so the JPEG is chosen instead.
346347 </div>
347348
348- <div class=example>
349+ <div class=example id='eximage-set-multi-resolution' >
349350 Raster images can be mixed with vector images,
350351 or even CSS generated images.
351352
@@ -418,7 +419,7 @@ Image Fallbacks and Annotations: the ''image()'' notation {#image-notation}
418419 css-image-fallbacks-and-annotations005.html
419420 </wpt>
420421
421- <div class='example'>
422+ <div class='example' id='ex-fallback' >
422423 The fallback color can be used to ensure that text is still readable
423424 even when the image fails to load.
424425 For example, the following legacy code works fine if the image is rectangular and has no transparency:
@@ -446,7 +447,7 @@ Image Fallbacks and Annotations: the ''image()'' notation {#image-notation}
446447 </div>
447448
448449<!-- Good example for the fallback() function
449- <div class='example'>
450+ <div class='example' id='ex-fallback-2' >
450451 For example, if a future specification defined a way to refer to a specific frame of an animated GIF with a fragment identifier,
451452 an author could write the following to get newer browsers to use the GIF's frame,
452453 and older browsers to instead download the fallback image:
@@ -461,7 +462,7 @@ Image Fallbacks and Annotations: the ''image()'' notation {#image-notation}
461462 (e.g. by the use of <a href="https://www.w3.org/TR/media-frags/#naming-space">media fragment identifiers</a> )
462463 that portion is clipped out of its context and used as a standalone image.
463464
464- <div class="example">
465+ <div class="example" id='ex-image-fragment' >
465466 For example, given the following image and CSS:
466467
467468 <a href="images/sprites.svg">
@@ -479,7 +480,7 @@ Image Fallbacks and Annotations: the ''image()'' notation {#image-notation}
479480 <em> must</em> support the <code> xywh=#,#,#,#</code> form of media fragment identifiers
480481 for images specified via ''image()'' . [[!MEDIA-FRAGS]]
481482
482- <div class='example'>
483+ <div class='example' id='ex-image-fragment-fallback' >
483484 Note that image fragments can also be used with the ''url()'' notation.
484485 However, a legacy UA that doesn't understand the media fragments notation
485486 will ignore the fragment and simply display the entirety of the image.
@@ -508,7 +509,7 @@ Image Fallbacks and Annotations: the ''image()'' notation {#image-notation}
508509 If the ''image()'' function is specified with only a <<color>> argument (no URL),
509510 it represents a solid-color image of the specified color with no [=natural dimensions=] .
510511
511- <div class='example'>
512+ <div class='example' id='ex-solid-color' >
512513 For example,
513514 one can use this as a simple way to "tint" a background image,
514515 by overlaying a partially-transparent color over the top of the other image:
@@ -533,7 +534,7 @@ Image Fallbacks and Annotations: the ''image()'' notation {#image-notation}
533534 images default to no directionality at all,
534535 and thus don't care about the directionality of the surrounding element.
535536
536- <div class='example'>
537+ <div class='example' id='ex-image-directionality' >
537538 A list may use an arrow for a bullet that points into the content.
538539 If the list can contain both LTR and RTL text,
539540 though, the bullet may be on the left or the right,
@@ -887,7 +888,7 @@ Combining images: the ''cross-fade()'' notation {#cross-fade-function}
887888 That is, the image must look identical to the referenced element,
888889 modulo rasterization quality.
889890
890- <div class='example'>
891+ <div class='example' id='ex-element-reuse' >
891892
892893 As a somewhat silly example, a <{p}> element can be reused as a background elsewhere in the document:
893894
@@ -909,7 +910,7 @@ Combining images: the ''cross-fade()'' notation {#cross-fade-function}
909910 The function represents an image with the [=natural dimensions=] and appearance of the <a>paint source</a> .
910911 The host language defines the size and appearance of paint sources.
911912
912- <div class='example'>
913+ <div class='example' id='ex-element-not-rendered-ref' >
913914 For example, the ''element()'' function can reference an SVG <code> <pattern></code> element in an HTML document:
914915
915916 <pre class=lang-html>
@@ -958,7 +959,7 @@ Combining images: the ''cross-fade()'' notation {#cross-fade-function}
958959
959960 The function represents an <a>invalid image</a> .
960961
961- <div class='example'>
962+ <div class='example' id='ex-invalid image' >
962963
963964 For example, all of the following ''element()'' uses will result in a transparent background:
964965
@@ -994,7 +995,7 @@ Combining images: the ''cross-fade()'' notation {#cross-fade-function}
994995 for example, in SVG,
995996 any descendant of a <code> <defs></code> element is considered to be not rendered.
996997
997- <div class='example'>
998+ <div class='example' id='ex-element-preview' >
998999
9991000 The ''element()'' function can be put to many uses.
10001001 For example, it can be used to show a preview of the previous or next slide in a slideshow:
@@ -1126,7 +1127,7 @@ Using Out-Of-Document Sources: the <code>ElementSources</code> interface</h4>
11261127 like ''element(external fancy)'' or something.
11271128 Naming suggestions welcome.
11281129
1129- <div class='example'>
1130+ <div class='example' id='ex-external-canvas' >
11301131 For example, fancy animating backgrounds can be done with an external canvas:
11311132
11321133 <pre class=lang-html>
@@ -1208,7 +1209,7 @@ Gradients</h2>
12081209 <<conic-gradient()>> | <<repeating-conic-gradient()>> ]
12091210 </pre>
12101211
1211- <div class=example>
1212+ <div class=' example' id='ex-gradients-are-images' >
12121213
12131214 As with the other <<image>> types defined in this specification,
12141215 gradients can be used in any property that accepts images.
@@ -1228,7 +1229,7 @@ Gradients</h2>
12281229 gradients-with-border.html
12291230 </wpt>
12301231
1231- <div class='example'>
1232+ <div class='example' id='ex-default-gradient-box' >
12321233 For example, if you use a gradient as a background,
12331234 by default the gradient will draw into a <a>gradient box</a> the size of the element's padding box.
12341235 If 'background-size' is explicitly set to a value such as ''100px 200px'' ,
@@ -1300,7 +1301,7 @@ Linear Gradients: the ''linear-gradient()'' notation {#linear-gradients}
13001301
13011302The effect of colorspace on interpolation can be significant.
13021303
1303- <div class="example">
1304+ <div class="example" id='ex-colorspaces-srgb-lab-oklab' >
13041305 In this example, a linear gradient between the same pair of colors
13051306 #f01 and #081 is drawn in three different colorspaces.
13061307 The middle gradient uses gamma-encoded sRGB,
@@ -1323,7 +1324,7 @@ The effect of colorspace on interpolation can be significant.
13231324 alt="red to green gradient in three colorspaces" >
13241325</div>
13251326
1326- <div class="example">
1327+ <div class="example" id='ex-colorspaces-blue-white' >
13271328 In this example, a linear gradient between the same pair of colors
13281329 white and #01E is drawn in three different colorspaces.
13291330 The middle gradient uses gamma-encoded sRGB,
@@ -1348,7 +1349,7 @@ The effect of colorspace on interpolation can be significant.
13481349 alt="white to blue gradient in three colorspaces" >
13491350</div>
13501351
1351- <div class="example">
1352+ <div class="example" id='ex-hue-nonlinearity' >
13521353 In this example, a linear gradient between the same pair of colors
13531354 #44C and #795 is drawn in three different colorspaces.
13541355 This demonstrates that
@@ -1387,7 +1388,7 @@ although it is easy for the intermediate colors to fall out of gamut;
13871388they will then be gamut mapped
13881389to bring them back into gamut.
13891390
1390- <div class="example">
1391+ <div class="example" id='ex-colorspaces-rectangular-polar' >
13911392 In this example, a linear gradient between the same pair of colors
13921393 #A37 and #595 is drawn in five different colorspaces,
13931394 two of them polar.
@@ -1462,7 +1463,7 @@ Adding <<color-interpolation-method>></h4>
14621463 parsing/gradient-position-valid.html
14631464 </wpt>
14641465
1465- <div class="example">
1466+ <div class="example" id='ex-colorspaces-differ' >
14661467 In this example, a radial gradient between the same pair of colors
14671468 color(display-p3 0.918 0.2 0.161) and #081 is drawn in three different colorspaces.
14681469 Notice that the color stops do not all need to be in the same colorspace.
@@ -1541,7 +1542,7 @@ Conic Gradients: the ''conic-gradient()'' notation</h3>
15411542 They are also known as "angle" gradients in some contexts,
15421543 since they are produced by varying the rotation angle of a ray.
15431544
1544- <div class=example>
1545+ <div class=' example' id='ex-simple-conic' >
15451546 <div style="overflow: hidden">
15461547 <img style="float: right; margin-left: 1em;" src='images/conic-diagram.png' alt="[An image showing a box with a background shading gradually clockwise from white to black, starting from the top. A gradient circle is shown, and the colors at 0 and 216 degrees respectively.]">
15471548
@@ -1640,7 +1641,7 @@ Conic Gradient Examples</h4>
16401641
16411642 All of the following ''conic-gradient()'' examples are presumed to be applied to a box that is 300px wide and 200px tall, unless otherwise specified.
16421643
1643- <div class=example>
1644+ <div class=' example' id='ex-conic-syntax' >
16441645 Below are various ways of specifying the same basic conic gradient:
16451646
16461647 <pre class=lang-css>
@@ -1655,7 +1656,7 @@ Conic Gradient Examples</h4>
16551656 <img src="images/conic1.png" alt="" >
16561657 </div>
16571658
1658- <div class=example>
1659+ <div class=' example' id='ex-conic-angles' >
16591660 Below are various ways of specifying the same basic conic gradient.
16601661 This demonstrates how even though color stops with angles outside [0deg, 360deg) are not directly painted,
16611662 they can still affect the color of the painted part of the gradient.
@@ -1669,7 +1670,7 @@ Conic Gradient Examples</h4>
16691670 <img src="images/conic2.png" alt="" >
16701671 </div>
16711672
1672- <div class=example>
1673+ <div class=' example' id='ex-conic-rotated' >
16731674 Below are two different ways of specifying the same rotated conic gradient, one with a rotation angle and one without:
16741675
16751676 <pre class=lang-css>
@@ -1688,7 +1689,7 @@ Conic Gradient Examples</h4>
16881689 <img src="images/conic4.png" alt="" >
16891690 </div>
16901691
1691- <div class=example>
1692+ <div class=' example' id='ex-hsl-wheel' >
16921693 A conic gradient with a radial gradient overlaid on it, to draw a hue & saturation wheel:
16931694
16941695 <pre class=lang-css>
@@ -1701,7 +1702,7 @@ Conic Gradient Examples</h4>
17011702 <img src="images/conic5.png" alt="" >
17021703 </div>
17031704
1704- <div class=example>
1705+ <div class=' example' id='ex-conic-pie' >
17051706 A conic gradient used to draw a simple pie chart.
17061707 The ''0deg'' color stop positions will be fixed up to be equal to the position of the color stop before them.
17071708 This will produce infinitesimal (invisible) transitions between the color stops with different colors,
@@ -1748,15 +1749,15 @@ Repeating Gradients: the ''repeating-linear-gradient()'', ''repeating-radial-gra
17481749 gradient/color-stops-parsing.html
17491750 </wpt>
17501751
1751- <div class=example>
1752+ <div class=' example' id='ex-conic-repeat' >
17521753 Basic repeating conic gradient:
17531754
17541755 <pre> background: repeating-conic-gradient(gold, #f06 20deg);</pre>
17551756
17561757 <img src="images/repeating-conic1.png" alt="">
17571758 </div>
17581759
1759- <div class=example>
1760+ <div class=' example' id='ex-gradient-starburst' >
17601761 Repeating color stops with abrupt transitions creates a starburst-type background:
17611762
17621763 <pre class=lang-css>
@@ -1769,7 +1770,7 @@ Repeating Gradients: the ''repeating-linear-gradient()'', ''repeating-radial-gra
17691770 <img src="images/repeating-conic2.png" alt="">
17701771 </div>
17711772
1772- <div class=example>
1773+ <div class=' example' id='ex-checkerboards' >
17731774 Here repeating color stops with abrupt transitions are used to create a checkerboard:
17741775
17751776 <pre class=lang-css>
@@ -1947,7 +1948,7 @@ Coloring the Gradient Line</h4>
19471948 gradient/xyz-gradient.html
19481949 </wpt>
19491950
1950- <div class="example">
1951+ <div class="example" id='ex-missing-hue' >
19511952 For example, given the following gradient definition:
19521953
19531954 <pre class="lang-css">
@@ -2011,7 +2012,7 @@ Coloring the Gradient Line</h4>
20112012 between the surrounding color stops,
20122013 with the “halfway color” occurring exactly where the hint specifies.
20132014
2014- <div class=example>
2015+ <div class=' example' id='ex-transition-hints' >
20152016 Here an example of a linear gradient without [=transition hint=] (top) compared to one with a transition hint between the red and blue [=color stops=] (bottom).
20162017
20172018 <img src="images/gradient-colors-transition-hint-comparison.png" alt="">
@@ -2088,7 +2089,7 @@ Color Stop “Fixup”</h4>
20882089 <a href="http://www.w3.org/TR/css-animations/">animations</a>
20892090 or <a href="http://www.w3.org/TR/css-transitions/">transitions</a> .
20902091
2091- <div class=example>
2092+ <div class=' example' id='ex-gradient-fixup' >
20922093 Below are several pairs of gradients.
20932094 The latter of each pair is a manually “fixed-up” version of the former,
20942095 obtained by applying the above rules.
@@ -2193,7 +2194,7 @@ Color Stop “Fixup”</h4>
21932194 If the sum is larger,
21942195 any stripes or portions beyond the |total width| are truncated.
21952196
2196- <div class=example>
2197+ <div class=' example' id='ex-stripes-total-width' >
21972198 For example,
21982199 ''stripes(red 1fr, green 2fr, blue 100px)''
21992200 with a |total width| of ''400px''
@@ -2608,7 +2609,7 @@ Overriding Image Resolutions: the 'image-resolution' property {#the-image-resolu
26082609 As vector formats such as SVG do not have a [=natural resolution=] ,
26092610 this property has no effect on vector images.
26102611
2611- <div class='example'>
2612+ <div class='example' id='ex-image-resolution' >
26122613 Printers tend to have substantially higher resolution than computer monitors;
26132614 due to this, an image that looks fine on the screen may look pixelated when printed out.
26142615 The 'image-resolution' property can be used to embed a high-resolution image into the document
@@ -2630,7 +2631,7 @@ Overriding Image Resolutions: the 'image-resolution' property {#the-image-resolu
26302631 </div>
26312632
26322633
2633- <div class="example">
2634+ <div class="example" id='ex-resolution-from-image' >
26342635 Some image formats can encode the image resolution into the image data.
26352636 This rule specifies that the UA should use the image resolution found in the image itself,
26362637 falling back to 1 image pixel per CSS ''px'' unit.
@@ -2648,7 +2649,7 @@ Overriding Image Resolutions: the 'image-resolution' property {#the-image-resolu
26482649
26492650 </div>
26502651
2651- <div class="example">
2652+ <div class="example" id='ex-resolution-300' >
26522653 Using this rule, the image resolution is set to 300dpi.
26532654 (The resolution in the image, if any, is ignored.)
26542655
@@ -2869,7 +2870,7 @@ Serialization {#serialization}
28692870 For ''cross-fade()'' ,
28702871 always serialize the <<percentage>> .
28712872
2872- <div class='example'>
2873+ <div class='example' id='ex-serialize-gradient' >
28732874 For example, a gradient specified as:
28742875
28752876 <pre> Linear-Gradient( to bottom, red 0%,yellow,black 100px)</pre>
0 commit comments