- From: Tab Atkins Jr.. via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 10 Nov 2011 22:31:33 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css-variables In directory hutz:/tmp/cvs-serv24566 Modified Files: Overview.html Overview.src.html Log Message: Editorial tweak of an example. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css-variables/Overview.html,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Overview.html 10 Nov 2011 22:29:18 -0000 1.26 +++ Overview.html 10 Nov 2011 22:31:31 -0000 1.27 @@ -429,7 +429,8 @@ <p>The <one> element defines a value for ‘<code class=property>data-foo</code>’. The <two> element inherits this value, and additionally assigns a value to ‘<code - class=property>data-bar</code>’. Finally, the <three> element + class=property>data-bar</code>’ using the ‘<code + class=css>foo</code>’ variable. Finally, the <three> element inherits the ‘<code class=property>data-bar</code>’ value <em>after</em> variable substitution (in other words, it sees the value ‘<code class=css>calc(10px + 10px)</code>’), and then Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css-variables/Overview.src.html,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Overview.src.html 10 Nov 2011 22:29:18 -0000 1.25 +++ Overview.src.html 10 Nov 2011 22:31:31 -0000 1.26 @@ -200,7 +200,7 @@ two { data-bar: calc(data(foo) + 10px); } three { data-foo: calc(data(bar) + 10px); }</pre> - <p>The <one> element defines a value for 'data-foo'. The <two> element inherits this value, and additionally assigns a value to 'data-bar'. Finally, the <three> element inherits the 'data-bar' value <em>after</em> variable substitution (in other words, it sees the value ''calc(10px + 10px)''), and then redefines 'data-foo' in terms of that value. Since the value it inherited for 'data-bar' no longer contains a reference to the 'data-foo' property defined on <one>, defining 'data-foo' using the ''data(bar)'' variable is not cyclic, and actually defines a value that will eventually (when referenced as a variable in a normal property) resolve to ''30px''.</p> + <p>The <one> element defines a value for 'data-foo'. The <two> element inherits this value, and additionally assigns a value to 'data-bar' using the ''foo'' variable. Finally, the <three> element inherits the 'data-bar' value <em>after</em> variable substitution (in other words, it sees the value ''calc(10px + 10px)''), and then redefines 'data-foo' in terms of that value. Since the value it inherited for 'data-bar' no longer contains a reference to the 'data-foo' property defined on <one>, defining 'data-foo' using the ''data(bar)'' variable is not cyclic, and actually defines a value that will eventually (when referenced as a variable in a normal property) resolve to ''30px''.</p> </div> <p>The initial value of a <i>data property</i> is a special invalid value which makes the associated variable an <i>invalid variable</i>. This is represented by the keyword ''invalid'', but that keyword has no special meaning in itself, and is valid if set explicitly in a data property.</p>
Received on Thursday, 10 November 2011 22:31:34 UTC