- From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 11 Aug 2011 01:13:18 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-values In directory hutz:/tmp/cvs-serv17075 Modified Files: Overview.html Overview.src.html Log Message: Add cycle() notation per <http://lists.w3.org/Archives/Public/www-style/2009Jan/0104.html>. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-values/Overview.html,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- Overview.html 11 Aug 2011 01:12:46 -0000 1.79 +++ Overview.html 11 Aug 2011 01:13:16 -0000 1.80 @@ -273,7 +273,10 @@ class=css>min()</code>’ and ‘<code class=css>max()</code>’ </a> - <li><a href="#attr"><span class=secno>9.2. </span> Attribute References: + <li><a href="#cycle"><span class=secno>9.2. </span> Cycling Values: + ‘<code class=css>cycle()</code>’</a> + + <li><a href="#attr"><span class=secno>9.3. </span> Attribute References: ‘<code class=css>attr()</code>’</a> </ul> @@ -1409,7 +1412,55 @@ both auto and fixed layout tables may be treated as if ‘<code class=property>auto</code>’ had been specified. - <h3 id=attr><span class=secno>9.2. </span> Attribute References: + <h3 id=cycle><span class=secno>9.2. </span> Cycling Values: ‘<code + class=css>cycle()</code>’</h3> + + <p>The <dfn id=cycle0>‘<code class=css>cycle()</code>’</dfn> + expression allows descendant elements to cycle over a list of values + instead of inheriting the same value. The syntax of the ‘<code + class=css>cycle()</code>’ expression is: + + <pre>cycle( <value># )</pre> + + <p>where <code><value<</code> is a CSS value that is valid where + the expression is placed. If any of the values inside are not valid, + then the entire ‘<code class=css>cycle()</code>’ expression + is invalid. + + <p>The value returned by ‘<code class=css>cycle()</code>’ + must be determined by comparing the inherited value <var>I</var> (the + computed value on the parent, or, for the root, the initial value) to + the computed values <var>C<sub>n</sub></var> returned by the + <var>n</var>-th argument to ‘<code + class=css>cycle()</code>’. For the earliest + <var>C<sub>n</sub></var> such that <var>C<sub>n</sub></var> == + <var>I</var>, the value returned by cycle is <var>C<sub>n+1</sub></var>. + However, if this <var>C<sub>n</sub></var> is the last value, or if there + are no <var>C<sub>n</sub></var> that equal <var>I</var>, the computed + value of the first value is returned instead. + + <pre class=example> + /* make em elements italic, but make them normal if they're inside + something that's italic */ + em { font-style: cycle(italic, normal); }</pre> + + <pre class=example> + /* cycle between markers for nested lists, so that the top level has + disk markers, but nested lists use circle, square, box, and then + (for the 5th list deep) repeat */ + ul { list-style-type: disk; } + li > ul { list-style-type: cycle(disk, circle, square, box); }</pre> + + <p>The ‘<code class=css>cycle()</code>’ notation is not + allowed to be nested; nor may it contain ‘<code + class=css>attr()</code>’, ‘<a href="#calc0"><code + class=css>calc()</code></a>’, ‘<a href="#min"><code + class=css>min()</code></a>’, or ‘<a href="#max"><code + class=css>max()</code></a>’ notations. Declarations containing + such constructs are invalid and must be <a + href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>. + + <h3 id=attr><span class=secno>9.3. </span> Attribute References: ‘<code class=css>attr()</code>’</h3> <p class=issue>Describe the feature fully here, not just a delta from CSS @@ -2085,6 +2136,9 @@ <li>computed value, <a href="#computed-value" title="computed value"><strong>10.2.</strong></a> + <li>‘<code class=css>cycle()</code>’, <a href="#cycle0" + title="''cycle()''"><strong>9.2.</strong></a> + <li>deg, <a href="#deg" title=deg><strong>6.1.</strong></a> <li>dimension, <a href="#dimension" Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css3-values/Overview.src.html,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- Overview.src.html 11 Aug 2011 01:12:46 -0000 1.82 +++ Overview.src.html 11 Aug 2011 01:13:16 -0000 1.83 @@ -982,7 +982,47 @@ table cells in both auto and fixed layout tables may be treated as if 'auto' had been specified. +<h3 id="cycle"> +Cycling Values: ''cycle()''</h3> + + <p>The <dfn>''cycle()''</dfn> expression allows descendant elements + to cycle over a list of values instead of inheriting the same value. + The syntax of the ''cycle()'' expression is: + + <pre>cycle( <value># )</pre> + + <p>where <code><value<</code> is a CSS value that is valid where + the expression is placed. If any of the values inside are not valid, + then the entire ''cycle()'' expression is invalid. + + <p>The value returned by ''cycle()'' must be determined by comparing + the inherited value <var>I</var> (the computed value on the parent, + or, for the root, the initial value) to the computed values + <var>C<sub>n</sub></var> returned by the <var>n</var>-th argument to + ''cycle()''. + For the earliest <var>C<sub>n</sub></var> such that + <var>C<sub>n</sub></var> == <var>I</var>, the value returned by cycle + is <var>C<sub>n+1</sub></var>. However, if this <var>C<sub>n</sub></var> + is the last value, or if there are no <var>C<sub>n</sub></var> that + equal <var>I</var>, the computed value of the first value is returned + instead. + + <pre class="example"> + /* make em elements italic, but make them normal if they're inside + something that's italic */ + em { font-style: cycle(italic, normal); }</pre> + + <pre class="example"> + /* cycle between markers for nested lists, so that the top level has + disk markers, but nested lists use circle, square, box, and then + (for the 5th list deep) repeat */ + ul { list-style-type: disk; } + li > ul { list-style-type: cycle(disk, circle, square, box); }</pre> + <p>The ''cycle()'' notation is not allowed to be nested; nor may it + contain ''attr()'', ''calc()'', ''min()'', or ''max()'' notations. + Declarations containing such constructs are invalid and must be + <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>. <h3 id="attr"> Attribute References: ''attr()''</h3>
Received on Thursday, 11 August 2011 01:13:29 UTC