csswg/css3-values Overview.html,1.102,1.103 Overview.src.html,1.105,1.106

Update of /sources/public/csswg/css3-values
In directory hutz:/tmp/cvs-serv21018

Modified Files:
	Overview.html Overview.src.html 
Log Message:
More editorial tweaking of attr()

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-values/Overview.html,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- Overview.html	10 Oct 2011 21:56:00 -0000	1.102
+++ Overview.html	10 Oct 2011 22:10:51 -0000	1.103
@@ -1520,7 +1520,9 @@
    optional but must be present if the third argument is present) is a
    keyword drawn from the list below that tells the UA how to interpret the
    attribute value. If omitted, &lsquo;<code class=css>string</code>&rsquo;
-   is implied.
+   is implied. If the type is not valid for where the &lsquo;<code
+   class=css>attr()</code>&rsquo; expression is placed, the whole
+   &lsquo;<code class=css>attr()</code>&rsquo; expression is invalid.
 
   <p>The &lsquo;<code class=css>&lt;value></code>&rsquo; argument (which is
    optional) is a CSS value which must be valid where the &lsquo;<code
@@ -1534,6 +1536,11 @@
    fallback &lsquo;<code class=css>&lt;value></code>&rsquo; is absent, the
    default value for the given type (from the list below) is implied.
 
+  <p class=note>Note that the default value need not be of the type given.
+   For instance, if the type required of the attribute by the author is
+   &lsquo;<code class=css>px</code>&rsquo;, the default could still be
+   &lsquo;<code class=css>5em</code>&rsquo;.
+
   <p>The &lsquo;<code class=css>&lt;type></code>&rsquo; keywords are:
 
   <dl>
@@ -1648,37 +1655,9 @@
    &lsquo;<code class=property>inherit</code>&rsquo; and &lsquo;<code
    class=property>initial</code>&rsquo;), that type is implied".
 
-  <p>The &lsquo;<code class=css>attr()</code>&rsquo; form is only valid if
-   the type given (or implied, if it is missing) is valid for the property.
-   For example, all of the following are invalid and would cause a parse-time
-   error (and thus cause the relevant declaration, in this case all of them,
-   to be ignored):
-
-  <div class="illegal example">
-   <pre>
-content: attr(title, color); /* 'content' doesn't accept colors */
-
-content: attr(end-of-quote, string, inherit) close-quote; 
-/* the 'inherit' value is not allowed there, since the result would be
-'inherit close-quote', which is invalid. */
-
-margin: attr(vertical, length) attr(horizontal, deg); 
-/* deg units are not valid at that point */
-<!--
-font: attr(weight, integer) attr(size, length)/attr(height,
-integer) attr(family, string); /* invalid because
-&lt;'font-weight'>s are not integers, but identifiers. */
--->
-color: attr(color); /* 'color' doesn't accept strings */</pre>
-  </div>
-
-  <p class=note>Note that the default value need not be of the type given.
-   For instance, if the type required of the attribute by the author is
-   &lsquo;<code class=css>px</code>&rsquo;, the default could still be
-   &lsquo;<code class=css>5em</code>&rsquo;.
-
   <div class=example>
-   <p>Examples:</p>
+   <p>This example shows the use of attr() to visually illustrate data in an
+    XML file:</p>
 
    <pre>
 &lt;stock>
@@ -1716,9 +1695,31 @@
 }</pre>
   </div>
 
-  <p>The &lsquo;<code class=css>attr()</code>&rsquo; expression cannot
-   currently fall back onto another attribute. Future versions of CSS may
-   extend &lsquo;<code class=css>attr()</code>&rsquo; in this direction.
+  <div class="illegal example">
+   <p>All of the following examples are invalid and would cause a parse-time
+    error, and thus cause the relevant declaration&mdash;in this case all of
+    them&mdash;to be ignored:</p>
+
+   <pre>
+content: attr(title, color); /* 'content' doesn't accept colors */
+
+content: attr(end-of-quote, string, inherit) close-quote; 
+/* the 'inherit' value is not allowed there, since the result would be
+'inherit close-quote', which is invalid. */
+
+margin: attr(vertical, length) attr(horizontal, deg); 
+/* deg units are not valid at that point */
+<!--
+font: attr(weight, integer) attr(size, length)/attr(height,
+integer) attr(family, string); /* invalid because
+&lt;'font-weight'>s are not integers, but identifiers. */
+-->
+color: attr(color); /* 'color' doesn't accept strings */</pre>
+  </div>
+
+  <p class=note>The &lsquo;<code class=css>attr()</code>&rsquo; expression
+   cannot currently fall back onto another attribute. Future versions of CSS
+   may extend &lsquo;<code class=css>attr()</code>&rsquo; in this direction.
 
   <p class=issue>Should &lsquo;<code class=css>attr()</code>&rsquo; be
    allowed on any property, in any source language? For example, do we expect

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-values/Overview.src.html,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- Overview.src.html	10 Oct 2011 21:56:00 -0000	1.105
+++ Overview.src.html	10 Oct 2011 22:10:51 -0000	1.106
@@ -1067,7 +1067,8 @@
 	<p>The ''&lt;type>'' argument (which is optional but must be present if the
 	third argument is present) is a keyword drawn from the list below that tells 
 	the UA how to interpret the attribute value.  If omitted, ''string'' is
-	implied.</p>
+	implied.  If the type is not valid for where the ''attr()'' expression is 
+	placed, the whole ''attr()'' expression is invalid.</p>
 
 	<p>The ''&lt;value>'' argument (which is optional) is a CSS value which must
 	be valid where the ''attr()'' expression is placed. It represents a fallback
@@ -1078,6 +1079,10 @@
 	fallback ''&lt;value>'' is absent, the default value for the given
 	type (from the list below) is implied.</p>
 
+	<p class='note'>Note that the default value need not be of the type given. For
+	instance, if the type required of the attribute by the author is
+	''px'', the default could still be ''5em''.</p>
+
 	<p>The ''&lt;type>'' keywords are:</p>
 
 	<dl>
@@ -1153,37 +1158,9 @@
 	"If the property only accepts one type of value (aside from
 	'inherit' and 'initial'), that type is implied".</p>
 
-	<p>The ''attr()'' form is only valid if the type given (or implied, if it
-	is missing) is valid for the property. For example, all of the
-	following are invalid and would cause a parse-time error (and thus
-	cause the relevant declaration, in this case all of them, to be
-	ignored):</p>
-
-	<div class="illegal example">
-		<pre>
-content: attr(title, color); /* 'content' doesn't accept colors */
-
-content: attr(end-of-quote, string, inherit) close-quote; 
-/* the 'inherit' value is not allowed there, since the result would be
-'inherit close-quote', which is invalid. */
-
-margin: attr(vertical, length) attr(horizontal, deg); 
-/* deg units are not valid at that point */
-<!--
-font: attr(weight, integer) attr(size, length)/attr(height,
-integer) attr(family, string); /* invalid because
-&lt;'font-weight'>s are not integers, but identifiers. */
--->
-color: attr(color); /* 'color' doesn't accept strings */</pre>
-	</div>
-
-	<p class='note'>Note that the default value need not be of the type given. For
-	instance, if the type required of the attribute by the author is
-	''px'', the default could still be ''5em''.</p>
-
-
 	<div class="example">
-		<p>Examples:</p>
+		<p>This example shows the use of attr() to visually illustrate data 
+		in an XML file:</p>
 
 		<pre>
 &lt;stock>
@@ -1221,8 +1198,30 @@
 }</pre>
 	</div>
 
-	<p>The ''attr()'' expression cannot currently fall back onto another
-	attribute. Future versions of CSS may extend ''attr()'' in this
+	<div class="illegal example">
+		<p>All of the following examples are invalid and would cause a 
+		parse-time error, and thus cause the relevant declaration&mdash;in 
+		this case all of them&mdash;to be ignored:</p>
+
+		<pre>
+content: attr(title, color); /* 'content' doesn't accept colors */
+
+content: attr(end-of-quote, string, inherit) close-quote; 
+/* the 'inherit' value is not allowed there, since the result would be
+'inherit close-quote', which is invalid. */
+
+margin: attr(vertical, length) attr(horizontal, deg); 
+/* deg units are not valid at that point */
+<!--
+font: attr(weight, integer) attr(size, length)/attr(height,
+integer) attr(family, string); /* invalid because
+&lt;'font-weight'>s are not integers, but identifiers. */
+-->
+color: attr(color); /* 'color' doesn't accept strings */</pre>
+	</div>
+
+	<p class='note'>The ''attr()'' expression cannot currently fall back onto 
+	another attribute. Future versions of CSS may extend ''attr()'' in this
 	direction.</p>
 
 	<p class="issue">Should ''attr()'' be allowed on any property, in any

Received on Monday, 10 October 2011 22:10:55 UTC