Skip to content

Commit 4a6c921

Browse files
committed
Allow directional keyword and resolution in either order, apply flipping in inline dimension (not just horizontal), clean up fallback description, use rgba in example to show layering.
1 parent 48c5c27 commit 4a6c921

2 files changed

Lines changed: 37 additions & 31 deletions

File tree

css3-images/Overview.html

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
134134
notation</a>
135135

136136
<li><a href="#image-notation"><span class=secno>4.2. </span> Image
137-
Annotations: the &lsquo;<code class=css>image()</code>&rsquo;
138-
notation</a>
137+
Annotations and Fallbacks: the &lsquo;<code
138+
class=css>image()</code>&rsquo; notation</a>
139139

140140
<li><a href="#element-reference"><span class=secno>4.3. </span> Using
141141
Elements as Images: the &lsquo;<code class=css>element()</code>&rsquo;
@@ -386,8 +386,8 @@ <h3 id=url><span class=secno>4.1. </span> Image References and Image
386386
</div>
387387
<!-- ====================================================================== -->
388388

389-
<h3 id=image-notation><span class=secno>4.2. </span> Image Annotations: the
390-
&lsquo;<code class=css>image()</code>&rsquo; notation</h3>
389+
<h3 id=image-notation><span class=secno>4.2. </span> Image Annotations and
390+
Fallbacks: the &lsquo;<code class=css>image()</code>&rsquo; notation</h3>
391391

392392
<p>The &lsquo;<code class=css>image()</code>&rsquo; notation allows an
393393
author to tag an image with a few types of useful processing instructions
@@ -404,7 +404,7 @@ <h3 id=image-notation><span class=secno>4.2. </span> Image Annotations: the
404404
<p>where &lt;image-decl> is given by:
405405

406406
<pre class=prod><dfn id=ltimage-decl>&lt;image-decl></dfn> =
407-
[ &lt;string> | &lt;url> ] [ snap? && &lt;resolution> ]? [ ltr | rtl ]?
407+
[ &lt;string> | &lt;url> ] [ snap? && &lt;resolution> ]? && [ ltr | rtl ]?
408408

409409
</pre>
410410

@@ -429,16 +429,18 @@ <h3 id=image-notation><span class=secno>4.2. </span> Image Annotations: the
429429
<p>If a directional keyword (&lsquo;<code class=css>ltr</code>&rsquo; or
430430
&lsquo;<code class=css>rtl</code>&rsquo;) is given, the image itself gains
431431
that directionality. If the image is used in a property on an element with
432-
opposite directionality, is must be rendered horizontally flipped (in the
433-
image's own coordinate space).
434-
435-
<p>Multiple arguments can be given, in which case the function represents
436-
the first &lt;image-decl> representing an image that the browser can
437-
successfully load and display. The final argument can be a &lt;color> or
438-
other type of &lt;image to serve as ultimate fallback if none of the
439-
preceding &lt;image-decl>s can be used. If the final argument is a
440-
&lt;color>, it represents a solid-color image of the given color with no
441-
<a href="#intrinsic-dimensions"><i>intrinsic dimensions</i></a>.
432+
opposite directionality, is must be mirrored in the inline dimension when
433+
rendered.
434+
435+
<p>Multiple arguments can be given separated by commas, in which case the
436+
function represents the first &lt;image-decl> representing an image that
437+
the browser can successfully load and display. The final argument can be a
438+
&lt;color>, <a href="#gradients">&lt;gradient></a>, or <a
439+
href="#element-reference">&lt;element-reference></a>, which serves as the
440+
ultimate fallback if none of the preceding &lt;image-decl>s can be used.
441+
If the final argument is a &lt;color>, it represents a solid-color image
442+
of the given color with no <a href="#intrinsic-dimensions"><i>intrinsic
443+
dimensions</i></a>.
442444

443445
<div class=example>
444446
<p>The rule below would tell the UA to load &lsquo;<code
@@ -452,15 +454,16 @@ <h3 id=image-notation><span class=secno>4.2. </span> Image Annotations: the
452454
GIF may not exist on the server, so requesting it returns an HTML 404
453455
page instead of an image.</p>
454456

455-
<pre>background-image: image(url(wavy.svg), 'wavy.png' 150dpi, "wavy.gif", blue);</pre>
457+
<pre>background-image: image(url(wavy.svg), 'wavy.png' 150dpi, "wavy.gif", rgba(255,0,0,0.5));</pre>
456458

457459
<p>The &lsquo;<code class=property>background-image</code>&rsquo; property
458460
specifies that dimensionless images must stretch to cover the entire
459461
background positioning area <a href="#CSS3BG"
460462
rel=biblioentry>[CSS3BG]<!--{{CSS3BG}}--></a>, so if none of the
461-
specified images can be displayed the background will be painted blue. As
462-
with any image, this fallback will be painted over the &lsquo;<code
463-
class=property>background-color</code>&rsquo; (if any).</p>
463+
specified images can be displayed the background will be painted
464+
semi-transparent blue. As with any image, this fallback will be painted
465+
over the &lsquo;<code class=property>background-color</code>&rsquo; (if
466+
any).</p>
464467
</div>
465468
<!-- ====================================================================== -->
466469

css3-images/Overview.src.html

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ <h3 id="url">
194194
<!-- ====================================================================== -->
195195

196196
<h3 id="image-notation">
197-
Image Annotations: the ''image()'' notation</h3>
197+
Image Annotations and Fallbacks: the ''image()'' notation</h3>
198198

199199
<p>The ''image()'' notation allows an author to tag an image with a few types
200200
of useful processing instructions which can affect the rendering of the image
@@ -210,7 +210,7 @@ <h3 id="image-notation">
210210
<p>where &lt;image-decl> is given by:</p>
211211

212212
<pre class='prod'><dfn>&lt;image-decl></dfn> =
213-
[ &lt;string> | &lt;url> ] [ snap? && &lt;resolution> ]? [ ltr | rtl ]?
213+
[ &lt;string> | &lt;url> ] [ snap? && &lt;resolution> ]? && [ ltr | rtl ]?
214214

215215
<p>Each <i>&lt;image-decl></i> represents an external image. If a &lt;string>
216216
is provided, it represents the same image that it would if the the string
@@ -229,13 +229,16 @@ <h3 id="image-notation">
229229

230230
<p>If a directional keyword (''ltr'' or ''rtl'') is given, the image itself
231231
gains that directionality. If the image is used in a property on an element
232-
with opposite directionality, is must be rendered horizontally flipped (in the
233-
image's own coordinate space).</p>
234-
235-
<p>Multiple arguments can be given, in which case the function represents
236-
the first &lt;image-decl> representing an image that the browser can successfully
237-
load and display. The final argument can be a &lt;color> or other type of
238-
&lt;image to serve as ultimate fallback if none of the preceding &lt;image-decl>s
232+
with opposite directionality, is must be mirrored in the inline dimension
233+
when rendered.</p>
234+
235+
<p>Multiple arguments can be given separated by commas, in which case the
236+
function represents the first &lt;image-decl> representing an image that
237+
the browser can successfully load and display.
238+
The final argument can be a &lt;color>,
239+
<a href="#gradients">&lt;gradient></a>, or
240+
<a href="#element-reference">&lt;element-reference></a>,
241+
which serves as the ultimate fallback if none of the preceding &lt;image-decl>s
239242
can be used. If the final argument is a &lt;color>, it represents a solid-color
240243
image of the given color with no <i>intrinsic dimensions</i>.
241244

@@ -249,13 +252,13 @@ <h3 id="image-notation">
249252
exist on the server, so requesting it returns an HTML 404 page instead of
250253
an image.</p>
251254

252-
<pre>background-image: image(url(wavy.svg), 'wavy.png' 150dpi, "wavy.gif", blue);</pre>
255+
<pre>background-image: image(url(wavy.svg), 'wavy.png' 150dpi, "wavy.gif", rgba(255,0,0,0.5));</pre>
253256

254257
<p>The 'background-image' property specifies that dimensionless images
255258
must stretch to cover the entire background positioning area
256259
[[CSS3BG]], so if none of the specified images can be displayed
257-
the background will be painted blue. As with any image, this fallback
258-
will be painted over the 'background-color' (if any).</p>
260+
the background will be painted semi-transparent blue. As with any image,
261+
this fallback will be painted over the 'background-color' (if any).</p>
259262
</div>
260263

261264
<!-- ====================================================================== -->

0 commit comments

Comments
 (0)