csswg/css3-images Overview.html,1.208,1.209 Overview.src.html,1.216,1.217

Update of /sources/public/csswg/css3-images
In directory hutz:/tmp/cvs-serv16079

Modified Files:
	Overview.html Overview.src.html 
Log Message:
Added an element() example for the non-rendered or replaced-descendant case.

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-images/Overview.html,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -d -r1.208 -r1.209
--- Overview.html	11 Nov 2011 03:20:19 -0000	1.208
+++ Overview.html	11 Nov 2011 03:29:06 -0000	1.209
@@ -676,8 +676,41 @@
    <dt>The function references an element that is a descendant of a replaced
     element
 
-   <dd>The function represents a solid-color transparent-black image with no
-    intrinsic dimensions.
+   <dd>
+    <p>The function represents a solid-color transparent-black image with no
+     intrinsic dimensions.</p>
+
+    <div class=example>
+     <p>For example, all of the following &lsquo;<code
+      class=css>element()</code>&rsquo; uses will result in a transparent
+      background:</p>
+
+     <pre>
+&lt;!DOCTYPE html>
+&lt;script>
+var p = document.createElement('p');
+p.textContent = "one";
+document.CSSElementMap.one = p;
+&lt;/script>
+&lt;p id='two' style="display:none;">two&lt;/p>
+&lt;iframe src="http://example.com">
+	&lt;p id='three'>I'm fallback content!&lt;/p>
+&lt;/iframe>
+&lt;ul>
+	&lt;li style="background: element(one);">
+	  A P element doesn't represent a paint source,
+	  and it's not rendered unless it's in a document.
+	&lt;/li>
+	&lt;li style="background: element(#two);">
+	  Similarly, a display:none element isn't rendered, and 
+	  P still doesn't represent a paint source.
+	&lt;/li>
+	&lt;li style="background: element(#three);">
+	  The descendants of a replaced element like an IFRAME
+	  can't be used in ''element()'' either.
+	&lt;/li>
+&lt;/ul></pre>
+    </div>
 
    <dt>Otherwise
 

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-images/Overview.src.html,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- Overview.src.html	11 Nov 2011 03:20:20 -0000	1.216
+++ Overview.src.html	11 Nov 2011 03:29:06 -0000	1.217
@@ -351,7 +351,39 @@
 
 		<dt>The function references an element that is not rendered</dt>
 		<dt>The function references an element that is a descendant of a replaced element</dt>
-		<dd>The function represents a solid-color transparent-black image with no intrinsic dimensions.</dd>
+		<dd>
+			<p>The function represents a solid-color transparent-black image with no intrinsic dimensions.</p>
+
+			<div class='example'>
+				<p>For example, all of the following ''element()'' uses will result in a transparent background:</p>
+
+				<pre>
+&lt;!DOCTYPE html>
+&lt;script>
+var p = document.createElement('p');
+p.textContent = "one";
+document.CSSElementMap.one = p;
+&lt;/script>
+&lt;p id='two' style="display:none;">two&lt;/p>
+&lt;iframe src="http://example.com">
+	&lt;p id='three'>I'm fallback content!&lt;/p>
+&lt;/iframe>
+&lt;ul>
+	&lt;li style="background: element(one);">
+	  A P element doesn't represent a paint source,
+	  and it's not rendered unless it's in a document.
+	&lt;/li>
+	&lt;li style="background: element(#two);">
+	  Similarly, a display:none element isn't rendered, and 
+	  P still doesn't represent a paint source.
+	&lt;/li>
+	&lt;li style="background: element(#three);">
+	  The descendants of a replaced element like an IFRAME
+	  can't be used in ''element()'' either.
+	&lt;/li>
+&lt;/ul></pre>
+			</div>
+		</dd>
 
 		<dt>Otherwise</dt>
 		<dd>

Received on Friday, 11 November 2011 03:29:15 UTC