You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><url-token> is given as <code>[!#$%&*-~]|{nonascii}|{escape}</code>
@@ -232,7 +232,7 @@ <h3 id="image-notation">Image Fallbacks: the ''image()'' notation</h3>
232
232
<h3id=element-reference>Using Elements as Images: The ''element()'' notation</h3>
233
233
<p>The ''element()'' function allows an author to reference an element in the document that should be used as an image. As the referenced element changes, for example, by the user typing into a <textarea> element or a script drawing into a <canvas> element in HTML, the image produced by the ''element()'' function stays in sync, allowing dynamic effects such as script-animated background images or previews of the next slide in a slideshow. The syntax for ''element()'' is defined as:</p>
<p>where <id-selector> is an ID selector [[SELECTORS3]], and <identifier> is an identifer [[CSS3VALUES]].</p>
235
+
<p>where <id-selector> is an ID selector [[!SELECT]], and <identifier> is an identifer [[!CSS3VAL]].</p>
236
236
<p>If the argument to the ''element()'' function is an ID selector, the function references the element matched by the selector. If it's an identifier, the function references the element who's <dfn>CSS element reference identifier</dfn> is the identifier. (CSS does not define how an element acquires a ''CSS element reference identifier''; that is determined by the host language.) If no element in the document matches the selector, or no element has the identifier as its ''CSS element reference identifier'', the function represents a fully transparent image with no intrinsic dimensions, equivalent to <code>image(transparent)</code>. Otherwise, the function represents an image with width and height equal to the width and height of the referenced element, with an appearance exactly equivalent to that of the referenced element. Whether or not the referenced element is currently being rendered on-screen, for media types where this is relevant, must not affect the appearance of the image represented by the function; the image must always be equivalent to how the element would appear when rendered on-screen. If the document changes so that which element is matched, or whether an element is matched at all, changes, the image represented by the function must change accordingly.</p>
237
237
<p>If the argument passed to ''element()'' isn't an ID selector or an ident, it is a syntax error.</p>
238
238
<divclass=example>
@@ -803,11 +803,11 @@ <h3 id=serializing-url-notation>Serializing the ''url()'' notation</h3>
803
803
</div>
804
804
805
805
<div>
806
-
<h3id=serializing-image-notation>Serializing the ''image()'' notation</h3>
807
-
<p>To serialize an image() function:</p>
806
+
<h3id=serializing-image-notation>Serializing the ''image()'' / ''<image-list>'' notation</h3>
807
+
<p>To serialize an ''<image-list>'':</p>
808
808
<ol>
809
809
<li>Append "image(" to s.</li>
810
-
<li>For each argument, serialize the argument as an <image-decl>, <color>, or <gradient> as appropriate, and append it to s. Then, if it is not the final argument, append a comma and a space ", " to s.</li>
810
+
<li>For each argument, serialize the argument as an <image-decl>, <color>, <element-reference>, or <gradient> as appropriate, and append it to s. Then, if it is not the final argument, append a comma and a space ", " to s.</li>
811
811
<li>Append a close parenthesis ")" to s.</li>
812
812
</ol>
813
813
<p>To serialize an ''<image-decl>'':</p>
@@ -818,6 +818,16 @@ <h3 id=serializing-image-notation>Serializing the ''image()'' notation</h3>
818
818
</ol>
819
819
</div>
820
820
821
+
<div>
822
+
<h3id=serializing-element-notation>Serializing the ''element()'' / ''<element-reference>'' notation</h3>
823
+
<p>To serialize an ''<element-reference>'':</p>
824
+
<ol>
825
+
<li>Append "element(" to s.</li>
826
+
<li>Serialize the argument as a selector or identifier, as appropriate, and append it to s.</li>
0 commit comments