@@ -371,19 +371,38 @@ <h3 id=url><span class=secno>4.1. </span> Image References and Image
371371
372372 < p > A portion of an image may be referenced (clipped out and used as a
373373 standalone image) by use of < a
374- href ="http://www.w3.org/TR/media-frags/#naming-space "> fragment
374+ href ="http://www.w3.org/TR/media-frags/#naming-space "> media fragment
375375 identifiers</ a > . < a href ="#MEDIA-FRAGS "
376376 rel =biblioentry > [MEDIA-FRAGS]<!--{{!MEDIA-FRAGS}}--> </ a >
377377
378378 < div class =example >
379379 < p > For example,</ p >
380380
381- < pre > background-image: url('logos .png#xywh=10,30,60,20')</ pre >
381+ < pre > background-image: url('sprites .png#xywh=10,30,60,20')</ pre >
382382
383- < p > uses the 60 pixel by 20 pixel rectangle of < code > logos .png</ code >
383+ < p > uses the 60 pixel by 20 pixel rectangle of < code > sprites .png</ code >
384384 beginning at the point 10 pixels in from the left, 30 pixels down from
385385 the top.
386386 </ div >
387+
388+ < p class =note > Note however that a UA that doesn't understand the media
389+ fragments notation will display the entirety an image specified with
390+ ‘< code class =css > url</ code > ’. However, since URLs with media
391+ fragment identifiers can also be used in the ‘< code
392+ class =css > image()</ code > ’ notation defined below, authors can take
393+ advantage of CSS's forward-compatible parsing rules to provide a fallback
394+ when using an image fragment URL:
395+
396+ < div class =example >
397+ < p > In the example below, the ‘< code class =css > image()</ code > ’
398+ notation is used together with the media fragment syntax, so that UAs
399+ that don't support media fragments fail to parse the second declaration
400+ and use the first.
401+
402+ < pre >
403+ <!-- --> background-image: url('swirl.png'); /* old UAs */
404+ <!-- --> background-image: image('sprites.png#xywh=10,30,60,20'); /* new UAs */</ pre >
405+ </ div >
387406 <!-- ====================================================================== -->
388407
389408 < h3 id =image-notation > < span class =secno > 4.2. </ span > Image Annotations and
@@ -398,15 +417,26 @@ <h3 id=image-notation><span class=secno>4.2. </span> Image Annotations and
398417 that it can be automatically be reversed if used in text with a different
399418 directionality.
400419
420+ < p > So that authors can take advantage of CSS's forwards-compatible parsing
421+ rules to provide a fallback for image slices, implementations that support
422+ the ‘< code class =css > image()</ code > ’ notation < em > must</ em >
423+ support the < code > xywh=#,#,#,#</ code > form of media fragment identifiers
424+ for images. < a href ="#MEDIA-FRAGS "
425+ rel =biblioentry > [MEDIA-FRAGS]<!--{{!MEDIA-FRAGS}}--> </ a >
426+
427+ < p > The ‘< code class =css > image()</ code > ’ notation is defined as:
428+
429+
401430 < pre class =prod > < dfn id =ltimage-list > <image-list> </ dfn > =
402431 image( [ <image-decl> , ]* [ <image-decl> | <element-reference> | <gradient> | <color> ] )</ pre >
403432
404433 < p > where <image-decl> is given by:
405434
406435 < pre class =prod > < dfn id =ltimage-decl > <image-decl> </ dfn > =
407- [ <string> | <url> ] [ snap? && <resolution> ]? && [ ltr | rtl ]?
408-
409- </ pre >
436+ [ <string> | <url> ] [ snap? && <resolution> ]? && [ ltr | rtl ]?</ pre >
437+
438+ < p class =issue > Is there a point to allowing ‘< code
439+ class =css > url()</ code > ’?
410440
411441 < p > Each < a href ="#ltimage-decl "> < i > <image-decl> </ i > </ a > represents an
412442 external image. If a <string> is provided, it represents the same image
0 commit comments