- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 28 Feb 2012 20:32:14 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-images In directory hutz:/tmp/cvs-serv4048 Modified Files: Overview.html Overview.src.html Log Message: Shuffle around the definition of 'invalid image' so it doesn't look like it's specific to element(), and move some of the cases where an image can be invalid into the definition of <url>. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-images/Overview.html,v retrieving revision 1.302 retrieving revision 1.303 diff -u -d -r1.302 -r1.303 --- Overview.html 28 Feb 2012 19:16:08 -0000 1.302 +++ Overview.html 28 Feb 2012 20:32:11 -0000 1.303 @@ -195,8 +195,8 @@ <image> type</a> <ul class=toc> <li><a href="#url"><span class=secno>3.1. </span> Image References and - Image Slices: the ‘<code class=css>url()</code>’ - notation</a> + Image Slices: the ‘<code class=css><url></code>’ type + and ‘<code class=css>url()</code>’ notation</a> <li><a href="#image-notation"><span class=secno>3.2. </span> Image Fallbacks and Annotations: the ‘<code @@ -420,17 +420,28 @@ class=property>list-style-image</code>’, ‘<code class=property>cursor</code>’ properties <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. - <!-- ====================================================================== --> - + + <p>In some cases, an image is invalid. For example, a ‘<code + class=css><url></code>’ pointing to a resource that is not a + valid image format would produce an <a href="#invalid-image"><i>invalid + image</i></a>. An <dfn id=invalid-image>invalid image</dfn> is rendered as + a solid-color ‘<code class=css>rgba(0,0,0,0)</code>’ image + with no intrinsic dimensions. However, <a href="#invalid-image"><i>invalid + images</i></a> have special behavior in some contexts, such as the + ‘<code class=css>image()</code>’ notation.</p> + <!-- ====================================================================== --> <h3 id=url><span class=secno>3.1. </span> Image References and Image - Slices: the ‘<code class=css>url()</code>’ notation</h3> + Slices: the ‘<code class=css><url></code>’ type and + ‘<code class=css>url()</code>’ notation</h3> <p>The simplest way to indicate an image is to reference an image file by URL. This is done with the <a href="http://www.w3.org/TR/CSS21/syndata.html#uri">‘<code class=css>url()</code>’ notation</a>, defined in <a href="#CSS21" - rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>, or sometimes with a + ‘<code class=css><string></code>’ which is defined to + represent a URL. <div class=example> <p>In the example below, a background image is specified with ‘<code @@ -478,6 +489,10 @@ <!-- -->background-image: url('swirl.png'); /* old UAs */ <!-- -->background-image: image('sprites.png#xywh=10,30,60,20'); /* new UAs */</pre> </div> + + <p>If the UA cannot download, parse, or otherwise successfully display the + contents at the URL as an image, it must be treated as an <a + href="#invalid-image"><i>invalid image</i></a>.</p> <!-- ====================================================================== --> <h3 id=image-notation><span class=secno>3.2. </span> Image Fallbacks and @@ -496,11 +511,6 @@ for images. <a href="#MEDIA-FRAGS" rel=biblioentry>[MEDIA-FRAGS]<!--{{!MEDIA-FRAGS}}--></a> - <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 URL must be treated as - representing an <a href="#invalid-image"><i>invalid image</i></a>. - <p>The ‘<code class=css>image()</code>’ notation is defined as: @@ -513,9 +523,12 @@ href="http://dev.w3.org/csswg/css3-values/#urls">URL</a>. As usual for URLs in CSS, each is resolved to an absolute URL (as described in Values & Units) when ‘<code class=css>image()</code>’ appears in - the computed value of a property. If the UA cannot download, parse, or - otherwise successfully display the contents at the URL as an image, it - must be treated as an <a href="#invalid-image"><i>invalid image</i></a>. + the computed value of a property. + + <p>If a URL 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 URL must be treated as representing an <a + href="#invalid-image"><i>invalid image</i></a>. <p>Multiple arguments can be given separated by commas, in which case the function represents the first ‘<a href="#image-type"><code @@ -866,13 +879,6 @@ example, in SVG, any descendant of a <code><defs></code> element is considered to be not rendered. - <p>An <dfn id=invalid-image title="invalid image|invalid images">invalid - image</dfn> is rendered as a solid-color ‘<code - class=css>rgba(0,0,0,0)</code>’ image with no intrinsic dimensions. - However, <a href="#invalid-image"><i>invalid images</i></a> have special - behavior in some contexts, such as the ‘<code - class=css>image()</code>’ notation. - <p>The <dfn id=bounding-box>bounding box</dfn> of an element rendered using a CSS rendering model is the smallest rectangle that contains the <a href="http://www.w3.org/TR/2011/CR-css3-background-20110215/#border-image-area">border @@ -2901,10 +2907,7 @@ title="intrinsic width"><strong>5.1.</strong></a> <li>invalid image, <a href="#invalid-image" - title="invalid image"><strong>3.3.</strong></a> - - <li>invalid images, <a href="#invalid-image" - title="invalid images"><strong>3.3.</strong></a> + title="invalid image"><strong>3.</strong></a> <li><length>, <a href="#radial-size-circle" title="<length>"><strong>4.2.1.</strong></a> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css3-images/Overview.src.html,v retrieving revision 1.312 retrieving revision 1.313 diff -u -d -r1.312 -r1.313 --- Overview.src.html 28 Feb 2012 19:16:08 -0000 1.312 +++ Overview.src.html 28 Feb 2012 20:32:11 -0000 1.313 @@ -162,12 +162,14 @@ <p>Image values can be used in many CSS properties, including the 'background-image', 'list-style-image', 'cursor' properties [[!CSS21]]. + <p>In some cases, an image is invalid. For example, a ''<url>'' pointing to a resource that is not a valid image format would produce an <i>invalid image</i>. An <dfn>invalid image</dfn> is rendered as a solid-color ''rgba(0,0,0,0)'' image with no intrinsic dimensions. However, <i>invalid images</i> have special behavior in some contexts, such as the ''image()'' notation.</p> + <!-- ====================================================================== --> <h3 id="url"> -Image References and Image Slices: the ''url()'' notation</h3> +Image References and Image Slices: the ''<url>'' type and ''url()'' notation</h3> - <p>The simplest way to indicate an image is to reference an image file by URL. This is done with the <a href="http://www.w3.org/TR/CSS21/syndata.html#uri">''url()'' notation</a>, defined in [[!CSS21]]. + <p>The simplest way to indicate an image is to reference an image file by URL. This is done with the <a href="http://www.w3.org/TR/CSS21/syndata.html#uri">''url()'' notation</a>, defined in [[!CSS21]], or sometimes with a ''<string>'' which is defined to represent a URL. <div class="example"> <p>In the example below, a background image is specified with ''url()'' @@ -210,6 +212,8 @@ <!-- -->background-image: image('sprites.png#xywh=10,30,60,20'); /* new UAs */</pre> </div> + <p>If the UA cannot download, parse, or otherwise successfully display the contents at the URL as an image, it must be treated as an <i>invalid image</i>.</p> + <!-- ====================================================================== --> <h3 id="image-notation"> @@ -222,14 +226,14 @@ the ''image()'' notation <em>must</em> support the <code>xywh=#,#,#,#</code> form of media fragment identifiers for images. [[!MEDIA-FRAGS]]</p> - <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 URL must be treated as representing an <i>invalid image</i>.</p> - <p>The ''image()'' notation is defined as: <pre class='prod'><dfn id='image-list-type'><image-list></dfn> = image( [ <image-decl> , ]* [ <image-decl> | <color> ] ) <dfn id='image-decl-type'><image-decl></dfn> = [ <image> | <string> ] [ ltr | rtl ]?</pre> - <p>Each <code><string></code> represents a <a href="http://dev.w3.org/csswg/css3-values/#urls">URL</a>. As usual for URLs in CSS, each is resolved to an absolute URL (as described in Values & Units) when ''image()'' appears in the computed value of a property. If the UA cannot download, parse, or otherwise successfully display the contents at the URL as an image, it must be treated as an <i>invalid image</i>.</p> + <p>Each <code><string></code> represents a <a href="http://dev.w3.org/csswg/css3-values/#urls">URL</a>. As usual for URLs in CSS, each is resolved to an absolute URL (as described in Values & Units) when ''image()'' appears in the computed value of a property.</p> + + <p>If a URL 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 URL must be treated as representing an <i>invalid image</i>.</p> <p>Multiple arguments can be given separated by commas, in which case the function represents the first ''<image>'' that's not an <i>invalid image</i>. The final argument can specify a ''<color>'' to serve as an ultimate fallback; this can be used, e.g. for 'background-image', to ensure adequate contrast if none of the preceding ''<image-decl>s'' can be used. If the final argument is a ''<color>'', it represents a solid-color image of the given color with no <i>intrinsic dimensions</i>. If all of the provided ''<image-decl>s'' are <i>invalid images</i> and a fallback color was not provided as the last argument, the entire ''image()'' function must be treated as an <i>invalid image</i>. @@ -454,8 +458,6 @@ <p>An element is <dfn id='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. Host languages may define additional ways in which an element can be considered not rendered; for example, in SVG, any descendant of a <code><defs></code> element is considered to be not rendered.</p> - <p>An <dfn title="invalid image|invalid images">invalid image</dfn> is rendered as a solid-color ''rgba(0,0,0,0)'' image with no intrinsic dimensions. However, <i>invalid images</i> have special behavior in some contexts, such as the ''image()'' notation.</p> - <p>The <dfn>bounding box</dfn> of an element rendered using a CSS rendering model is the smallest rectangle that contains the <a href="http://www.w3.org/TR/2011/CR-css3-background-20110215/#border-image-area">border image areas</a> of all the fragments of the principal box. For an element rendered using the SVG rendering model, <a href="http://www.w3.org/TR/SVG/coords.html">the bounding box is defined by SVG</a>. <span class='note'>The SVG 1.1 definition of "bounding box" does not account for stroke width. This is expected to change in SVG 2.</span></p> <h4 id='paint-sources' class='no-num'>
Received on Tuesday, 28 February 2012 20:32:16 UTC