@@ -273,7 +273,10 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
273273 class =css > min()</ code > ’ and ‘< code
274274 class =css > max()</ code > ’ </ a >
275275
276- < li > < a href ="#attr "> < span class =secno > 9.2. </ span > Attribute References:
276+ < li > < a href ="#cycle "> < span class =secno > 9.2. </ span > Cycling Values:
277+ ‘< code class =css > cycle()</ code > ’</ a >
278+
279+ < li > < a href ="#attr "> < span class =secno > 9.3. </ span > Attribute References:
277280 ‘< code class =css > attr()</ code > ’</ a >
278281 </ ul >
279282
@@ -1409,7 +1412,55 @@ <h3 id=calc><span class=secno>9.1. </span> Calculations: ‘<a
14091412 both auto and fixed layout tables may be treated as if ‘< code
14101413 class =property > auto</ code > ’ had been specified.
14111414
1412- < h3 id =attr > < span class =secno > 9.2. </ span > Attribute References:
1415+ < h3 id =cycle > < span class =secno > 9.2. </ span > Cycling Values: ‘< code
1416+ class =css > cycle()</ code > ’</ h3 >
1417+
1418+ < p > The < dfn id =cycle0 > ‘< code class =css > cycle()</ code > ’</ dfn >
1419+ expression allows descendant elements to cycle over a list of values
1420+ instead of inheriting the same value. The syntax of the ‘< code
1421+ class =css > cycle()</ code > ’ expression is:
1422+
1423+ < pre > cycle( <value># )</ pre >
1424+
1425+ < p > where < code > <value<</ code > is a CSS value that is valid where
1426+ the expression is placed. If any of the values inside are not valid,
1427+ then the entire ‘< code class =css > cycle()</ code > ’ expression
1428+ is invalid.
1429+
1430+ < p > The value returned by ‘< code class =css > cycle()</ code > ’
1431+ must be determined by comparing the inherited value < var > I</ var > (the
1432+ computed value on the parent, or, for the root, the initial value) to
1433+ the computed values < var > C< sub > n</ sub > </ var > returned by the
1434+ < var > n</ var > -th argument to ‘< code
1435+ class =css > cycle()</ code > ’. For the earliest
1436+ < var > C< sub > n</ sub > </ var > such that < var > C< sub > n</ sub > </ var > ==
1437+ < var > I</ var > , the value returned by cycle is < var > C< sub > n+1</ sub > </ var > .
1438+ However, if this < var > C< sub > n</ sub > </ var > is the last value, or if there
1439+ are no < var > C< sub > n</ sub > </ var > that equal < var > I</ var > , the computed
1440+ value of the first value is returned instead.
1441+
1442+ < pre class =example >
1443+ /* make em elements italic, but make them normal if they're inside
1444+ something that's italic */
1445+ em { font-style: cycle(italic, normal); }</ pre >
1446+
1447+ < pre class =example >
1448+ /* cycle between markers for nested lists, so that the top level has
1449+ disk markers, but nested lists use circle, square, box, and then
1450+ (for the 5th list deep) repeat */
1451+ ul { list-style-type: disk; }
1452+ li > ul { list-style-type: cycle(disk, circle, square, box); }</ pre >
1453+
1454+ < p > The ‘< code class =css > cycle()</ code > ’ notation is not
1455+ allowed to be nested; nor may it contain ‘< code
1456+ class =css > attr()</ code > ’, ‘< a href ="#calc0 "> < code
1457+ class =css > calc()</ code > </ a > ’, ‘< a href ="#min "> < code
1458+ class =css > min()</ code > </ a > ’, or ‘< a href ="#max "> < code
1459+ class =css > max()</ code > </ a > ’ notations. Declarations containing
1460+ such constructs are invalid and must be < a
1461+ href ="http://www.w3.org/TR/CSS21/conform.html#ignore "> ignored</ a > .
1462+
1463+ < h3 id =attr > < span class =secno > 9.3. </ span > Attribute References:
14131464 ‘< code class =css > attr()</ code > ’</ h3 >
14141465
14151466 < p class =issue > Describe the feature fully here, not just a delta from CSS
@@ -2085,6 +2136,9 @@ <h2 class=no-num id=index>Index</h2>
20852136 < li > computed value, < a href ="#computed-value " title ="computed
20862137 value "> < strong > 10.2.</ strong > </ a >
20872138
2139+ < li > ‘< code class =css > cycle()</ code > ’, < a href ="#cycle0 "
2140+ title ="''cycle()'' "> < strong > 9.2.</ strong > </ a >
2141+
20882142 < li > deg, < a href ="#deg " title =deg > < strong > 6.1.</ strong > </ a >
20892143
20902144 < li > dimension, < a href ="#dimension "
0 commit comments