- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 03 Oct 2011 22:24:31 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css-variables In directory hutz:/tmp/cvs-serv30752 Modified Files: Overview.html Overview.src.html Log Message: Tweak the example about invalid variable use. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css-variables/Overview.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Overview.html 30 Sep 2011 22:23:54 -0000 1.13 +++ Overview.html 3 Oct 2011 22:24:29 -0000 1.14 @@ -1,8 +1,8 @@ <!DOCTYPE html> <html lang=en> - <head profile="http://www.w3.org/2006/03/hcard"><meta content="text/html; - charset=utf-8" http-equiv=Content-Type> + <head profile="http://www.w3.org/2006/03/hcard"><meta + content="text/html; charset=utf-8" http-equiv=Content-Type> <title>CSS Variables Module Level 1</title> <link href="http://dev.w3.org/csswg/css-module/default.css" rel=stylesheet @@ -22,14 +22,13 @@ <h1>CSS Variables Module Level 1</h1> - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 30 September - 2011</h2> + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 3 October 2011</h2> <dl> <dt>This version: <dd><a - href="http://www.w3.org/TR/2011/ED-css-variables-20110930/">http://dev.w3.org/csswg/css-variables/</a> + href="http://www.w3.org/TR/2011/ED-css-variables-20111003/">http://dev.w3.org/csswg/css-variables/</a> <!--<dt>Latest version: <dd><a href="http://www.w3.org/TR/css-variables/">http://www.w3.org/TR/css-variables/</a>--> @@ -50,13 +49,13 @@ <p class=copyright><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" rel=license>Copyright</a> © 2011 <a - href="http://www.w3.org/"><acronym title="World Wide Web - Consortium">W3C</acronym></a><sup>®</sup> (<a - href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute - of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym - title="European Research Consortium for Informatics and - Mathematics">ERCIM</acronym></a>, <a - href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a + href="http://www.w3.org/"><acronym + title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a + href="http://www.csail.mit.edu/"><acronym + title="Massachusetts Institute of Technology">MIT</acronym></a>, <a + href="http://www.ercim.eu/"><acronym + title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, + <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> @@ -404,13 +403,13 @@ <h3 id=using-invalid-variables><span class=secno>3.1. </span> Using Invalid Variables</h3> - <p>An <dfn id=invalid-variable title="invalid variable|invalid - variables">invalid variable</dfn> results from having variables directly - or indirectly refer to themselves, or from using an undefined variable. - Using an <a href="#invalid-variable"><i>invalid variable</i></a> in a - property value makes the declaration <a - href="#invalid-at-computed-value-time"><i>invalid at computed-value - time</i></a>. + <p>An <dfn id=invalid-variable + title="invalid variable|invalid variables">invalid variable</dfn> results + from having variables directly or indirectly refer to themselves, or from + using an undefined variable. Using an <a + href="#invalid-variable"><i>invalid variable</i></a> in a property value + makes the declaration <a href="#invalid-at-computed-value-time"><i>invalid + at computed-value time</i></a>. <p>A declaration that is <dfn id=invalid-at-computed-value-time>invalid at computed-value time</dfn> results from either using an <a @@ -423,13 +422,14 @@ <p>For example, in the following code:</p> <pre> -@var $invalid $invalid; /* Invalid, due to the trivial cycle. */ +@var $not-a-color 20px; p { background-color: red; } -p { background-color: $invalid; }</pre> +p { background-color: $not-a-color; }</pre> <p>the <p> elements will have transparent backgrounds (the initial value for ‘<code class=property>background-color</code>’), - rather than red backgrounds.</p> + rather than red backgrounds. The same would happen if the variable itself + was invalid (such as if it was part of a cycle) or undefined.</p> <p>Note the difference between this and what happens if the author had just written ‘<code class=css>background-color: 20px</code>’ @@ -521,7 +521,8 @@ const unsigned short MEDIA_RULE = 4; const unsigned short FONT_FACE_RULE = 5; const unsigned short PAGE_RULE = 6; - <ins>const unsigned short <a href="#variablerule"><code>VARIABLE_RULE</code></a> = 11;</ins> + <ins>const unsigned short <a + href="#variablerule"><code>VARIABLE_RULE</code></a> = 11;</ins> readonly attribute unsigned short type; attribute DOMString cssText; // raises(DOMException) on setting @@ -894,29 +895,29 @@ <li>active, <a href="#active-var-rule" title=active><strong>2.</strong></a> - <li>authoring tool, <a href="#authoring-tool" title="authoring - tool"><strong>6.2.</strong></a> + <li>authoring tool, <a href="#authoring-tool" + title="authoring tool"><strong>6.2.</strong></a> <li>inactive, <a href="#inactive-var-rule" title=inactive><strong>2.</strong></a> <li>invalid at computed-value time, <a - href="#invalid-at-computed-value-time" title="invalid at computed-value - time"><strong>3.1.</strong></a> + href="#invalid-at-computed-value-time" + title="invalid at computed-value time"><strong>3.1.</strong></a> - <li>invalid variable, <a href="#invalid-variable" title="invalid - variable"><strong>3.1.</strong></a> + <li>invalid variable, <a href="#invalid-variable" + title="invalid variable"><strong>3.1.</strong></a> - <li>invalid variables, <a href="#invalid-variable" title="invalid - variables"><strong>3.1.</strong></a> + <li>invalid variables, <a href="#invalid-variable" + title="invalid variables"><strong>3.1.</strong></a> <li>renderer, <a href="#renderer" title=renderer><strong>6.2.</strong></a> <li>style sheet <ul> - <li>as conformance class, <a href="#style-sheet" title="style sheet, as - conformance class"><strong>6.2.</strong></a> + <li>as conformance class, <a href="#style-sheet" + title="style sheet, as conformance class"><strong>6.2.</strong></a> </ul> <li><a href="#variablerule"><code>VARIABLE_RULE</code></a>, <a Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css-variables/Overview.src.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Overview.src.html 30 Sep 2011 22:23:54 -0000 1.13 +++ Overview.src.html 3 Oct 2011 22:24:29 -0000 1.14 @@ -168,11 +168,11 @@ <p>For example, in the following code:</p> <pre> -@var $invalid $invalid; /* Invalid, due to the trivial cycle. */ +@var $not-a-color 20px; p { background-color: red; } -p { background-color: $invalid; }</pre> +p { background-color: $not-a-color; }</pre> - <p>the <p> elements will have transparent backgrounds (the initial value for 'background-color'), rather than red backgrounds.</p> + <p>the <p> elements will have transparent backgrounds (the initial value for 'background-color'), rather than red backgrounds. The same would happen if the variable itself was invalid (such as if it was part of a cycle) or undefined.</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>
Received on Monday, 3 October 2011 22:24:33 UTC