@@ -197,48 +197,62 @@ <h3 id="url">
197197<!-- ====================================================================== -->
198198
199199< h3 id ="image-notation ">
200- Image Fallbacks: the ''image()'' notation</ h3 >
201-
202- < p > The ''image()'' notation allows an author to specify multiple images,
203- each one a fallback for the previous. The UA must use only the first image
204- that it can load and display. The syntax for ''image()'' is defined as
205-
206- < pre class ="prod "> < dfn > <image-list> </ dfn > =
207- image( [ <image-decl> , ]* [ <image-decl> | <color> | <element-reference> | <image-combination> | <gradient> ] )</ pre >
208-
209- < p > where <image-decl> is given by
210-
211- < pre class ="prod "> < dfn > <image-decl> </ dfn > =
212- [ <string> | <url-token> ] [ snap? && <resolution> ]?</ pre >
213-
214- < p > <url-token> is given as < code > [!#$%&*-~]|{nonascii}|{escape}</ code >
215- (i.e. the contents of ''url()'') using the productions in the
216- < a href ="http://www.w3.org/TR/CSS21/syndata.html#tokenization "> CSS2.1 tokenization</ a > .
217- < strong > The <url-token> must not contain unescaped brackets, commas,
218- white space characters, single quotes (') or double quotes (");
219- if it does the ''image()'' containing it is invalid.</ strong >
220-
221- < p > Each string or url-token represents the URI of an image. If a resolution
222- is given, then the image must be rendered at the specified resolution. If the
223- ''snap'' keyword is also specified, and the image is a raster image, then the
224- image must be rendered at the resolution closest to the specified resolution
225- that would result in no pixel rounding. < span class ="issue "> I don't think
226- "no pixel rounding" is the right terminology here... basically we want to
227- avoid blurry images.</ span > </ p >
228-
229- < p > The final argument may be a color or generated image, to serve as an
230- ultimate fallback if none of the preceeding < i > <image-decl> </ i > s can be used.
231- If it is a color, the < i > <image-list> </ i > must represent a single-color
232- image of that color with no < i > intrinsic dimensions</ i > .</ p >
200+ Image Annotations: the ''image()'' notation</ h3 >
201+
202+ < p > The ''image()'' notation allows an author to tag an image with a few types
203+ of useful processing instructions which can affect the rendering of the image.
204+ The author can specify the desired resolution the image should be rendered at,
205+ declare the directionality of an image so that it can be automatically be
206+ reversed if used in text with a different directionality, or declare fallback
207+ images to be used if the original image can't be decoded or is a type that the
208+ browser doesn't recognize.</ p >
209+
210+ < pre class ='prod '> < dfn > <image-list> </ dfn > =
211+ image( [ <image-decl> , ]* [ <image-decl> | <color> | <image> ] )</ pre >
212+
213+ < p > where <image-decl> is given by:</ p >
214+
215+ < pre class ='prod '> < dfn > <image-decl> </ dfn > =
216+ [ <string> | <url> ] [ snap? && <resolution> ]? [ ltr | rtl ]?
217+
218+ < p > Each < i > <image-decl> </ i > represents an external image. If a <string>
219+ is provided, it represents the same image that it would if the the string
220+ were given to the ''url()'' function.</ p >
221+
222+ < p > If a <resolution> is given, the image must be rendered at that resolution.
223+ < span class ='note '> Recall that the default resolution of images is ''1dppx'',
224+ so that one image pixel corresponds to one CSS ''px'' unit.</ span > If the
225+ ''snap'' keyword is also specified, and the specified resolution would make
226+ one image pixel larger than one device pixel, the image must be rendered at
227+ the specified resolution, rounded to the nearest value that would map one image
228+ pixel to an integer number of device pixels; if the specified resolution would
229+ make one image pixel smaller than one device pixel, the image must be rendered
230+ at the specified resolution, rounded to the nearest value that would map an
231+ integer number of image pixels to one device pixel.</ p >
232+
233+ < p > If a directional keyword (''ltr'' or ''rtl'') is given, the image itself
234+ gains that directionality. If the image is used in a property on an element
235+ with opposite directionality, is must be rendered horizontally flipped (in the
236+ image's own coordinate space).</ p >
237+
238+ < p > Multiple arguments can be given, in which case the function represents
239+ the first <image-decl> representing an image that the browser can successfully
240+ load and display. The final argument can be a <color> or other type of
241+ <image to serve as ultimate fallback if none of the preceding <image-decl> s
242+ can be used. If the final argument is a <color> , it represents a solid-color
243+ image of the given color with no < i > intrinsic dimensions</ i > .
233244
234245 < div class ="example ">
235- < p > For example, the rule below would tell the UA to load ''wavy.svg'' if
246+ < p > The rule below would tell the UA to load ''wavy.svg'' if
236247 it can; failing that to load ''wavy.png'' and display it at 150dpi;
237248 failing that to display ''wavy.gif''; and finally, if none of the images
238249 can be loaded and displayed, to use the color ''blue'' to create a
239- dimensionless background image.</ p >
250+ dimensionless background image. For example, the browser may not understand
251+ how to render SVG images, the PNG may be malformed, and the GIF may not
252+ exist on the server, so requesting it returns an HTML 404 page instead of
253+ an image.</ p >
240254
241- < pre > background-image: image(wavy.svg, 'wavy.png' 150dpi, "wavy.gif", blue);</ pre >
255+ < pre > background-image: image(url( wavy.svg) , 'wavy.png' 150dpi, "wavy.gif", blue);</ pre >
242256
243257 < p > The 'background-image' property specifies that dimensionless images
244258 must stretch to cover the entire background positioning area
0 commit comments