W3C home > Mailing lists > Public > public-css-commits@w3.org > September 2011

csswg/css-variables Overview.html,1.4,1.5 Overview.src.html,1.4,1.5

From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 29 Sep 2011 00:21:02 +0000
To: public-css-commits@w3.org
Message-Id: <E1R94N4-0003M8-1W@lionel-hutz.w3.org>
Update of /sources/public/csswg/css-variables
In directory hutz:/tmp/cvs-serv12880

Modified Files:
	Overview.html Overview.src.html 
Log Message:
Added an explanator sentence calling out the behavior difference between invalid syntax and invalid variables.

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css-variables/Overview.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Overview.html	29 Sep 2011 00:16:37 -0000	1.4
+++ Overview.html	29 Sep 2011 00:20:59 -0000	1.5
@@ -401,7 +401,13 @@
 
    <p>the &lt;p> elements will have transparent backgrounds (the initial
     value for &lsquo;<code class=property>background-color</code>&rsquo;),
-    rather than red backgrounds. This is different from the second</p>
+    rather than red backgrounds.</p>
+
+   <p>Note the difference between this and what happens if the author had
+    just written &lsquo;<code class=css>background-color: 20px</code>&rsquo;
+    directly in their stylesheet - that would be a normal syntax error, which
+    would cause the rule to be discarded, so the &lsquo;<code
+    class=css>background-color: red</code>&rsquo; rule would be used instead.</p>
   </div>
 
   <p class=note>The <a href="#invalid-at-computed-value-time"><i>invalid at

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css-variables/Overview.src.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Overview.src.html	29 Sep 2011 00:16:37 -0000	1.4
+++ Overview.src.html	29 Sep 2011 00:20:59 -0000	1.5
@@ -182,7 +182,9 @@
 p { background-color: red; }
 p { background-color: $invalid; }</pre>
 
-		<p>the &lt;p> elements will have transparent backgrounds (the initial value for 'background-color'), rather than red backgrounds.  This is different from the second</p>
+		<p>the &lt;p> elements will have transparent backgrounds (the initial value for 'background-color'), rather than red backgrounds.</p>
+
+		<p>Note the difference between this and what happens if the author had just written ''background-color: 20px'' directly in their stylesheet - that would be a normal syntax error, which would cause the rule to be discarded, so the ''background-color: red'' rule would be used instead.</p>
 	</div>
 
 	<p class='note'>The <i>invalid at computed-value time</i> concept exists because variables can't "fail early" like other syntax errors can, so by the time the user agent realizes a property value is invalid, it's already thrown away the other cascaded values.  I think ''attr()'' needs to rely on it as well, as its behavior is almost identical to variables.</p>
Received on Thursday, 29 September 2011 00:21:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 29 September 2011 00:21:03 GMT