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
Copy file name to clipboardExpand all lines: css3-images/Overview.src.html
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -220,7 +220,9 @@ <h3 id="image-notation">
220
220
<p>So that authors can take advantage of CSS's forwards-compatible parsing
221
221
rules to provide a fallback for image slices, implementations that support
222
222
the ''image()'' notation <em>must</em> support the <code>xywh=#,#,#,#</code>
223
-
form of media fragment identifiers for images. [[!MEDIA-FRAGS]]
223
+
form of media fragment identifiers for images. [[!MEDIA-FRAGS]]</p>
224
+
225
+
<p>If a URL in the list uses a fragment identifier syntax that the implementation does not understand, or which the implementation does not consider valid for that type of image, the image must be treated as invalid.</p>
224
226
225
227
<p>The ''image()'' notation is defined as:
226
228
@@ -261,6 +263,14 @@ <h3 id="image-notation">
261
263
<p>In the above, the background is the image "bg-image.png", overlaid with partially-transparent blue.
262
264
</div>
263
265
266
+
<divclass='example'>
267
+
<p>Implementations are required to ignore images that use fragment identifers they don't recognize, which allows authors to use new fragment formats and still get safe fallback, which doesn't exist in normal CSS (as an unknown fragment identifier in ''url()'' doesn't make the property invalid).</p>
268
+
269
+
<p>For example, if a future specification defined a way to refer to a specific frame of an animated GIF, an author could write the following to get newer browsers to use the GIF's frame, and older browsers to instead download the fallback image:</p>
<p>Along with each URL, the author may specify a directionality, similar to adding a <code>dir</code> attribute to an element in HTML. The image represented by the function takes on the directionality of the used URL. If a directional image is used on or in an element with opposite <ahref="http://www.w3.org/TR/CSS21/visuren.html#propdef-direction">direction</a>, the image must be flipped in the inline direction (as if it was transformed by, e.g., <code>scaleX(-1)</code>, if the inline direction is the X axis).</p>
265
275
266
276
<divclass='example'>
@@ -335,9 +345,11 @@ <h3 id='element-reference'>
335
345
<dt>The function doesn't reference an element</dt>
336
346
<dd>The function represents a solid-color transparent-black image with no intrinsic dimensions.</dd>
337
347
338
-
<dt>The function references an element that is not rendered, but which <ititle=paint-source>provides a paint source</i></dt>
348
+
<dt>The function references an <ititle='element-not-rendered'>element that is not rendered</i>, but which <ititle='paint-source'>provides a paint source</i></dt>
339
349
<dd>
340
-
<p>The function represents an image with the dimensions and appearance of the <ititle=paint-source>paint source</i>. The host language defines the dimensions and appearance of paint sources.
350
+
<p>The function represents an image with the dimensions and appearance of the <ititle=paint-source>paint source</i>. The host language defines the dimensions and appearance of paint sources.</p>
351
+
352
+
<p>If any properties on the element would inherit their value from the element's parent, they must instead be set to their initial value.</p>
341
353
342
354
<divclass='example'>
343
355
<p>For example, the ''element()'' function can reference an SVG <pattern> element in an HTML document:</p>
@@ -376,7 +388,7 @@ <h3 id='element-reference'>
376
388
</div>
377
389
</dd>
378
390
379
-
<dt>The function references an element that is not rendered</dt>
391
+
<dt>The function references an <ititle='element-not-rendered'>element that is not rendered</i></dt>
380
392
<dt>The function references an element that is a descendant of a replaced element</dt>
381
393
<dd>
382
394
<p>The function represents a solid-color transparent-black image with no intrinsic dimensions.</p>
@@ -442,6 +454,8 @@ <h3 id='element-reference'>
442
454
the image must look identical to the referenced element, modulo rasterization
443
455
quality.</p>
444
456
457
+
<p>An element is <dfnid='element-not-rendered' title='element-not-rendered'>not rendered</dfn> if it does not have an associated box. This can happen, for example, if the element or an ancestor is ''display:none'', or if the element is not in a rendered document. In SVG, the descendants of a <code><defs></code> element are also considered to not be rendered. Other host languages may define additional ways in which an element can be considered not rendered.</p>
0 commit comments