# HG changeset patch # Parent 37916d40e663728b0b477ded0444a34acdfd23f7 Add cycle() notation per . diff --git a/Overview.src.html b/Overview.src.html --- a/Overview.src.html +++ b/Overview.src.html @@ -942,7 +942,47 @@ width: 0px; table cells in both auto and fixed layout tables may be treated as if 'auto' had been specified. +

+Cycling Values: ''cycle()''

+

The ''cycle()'' expression allows descendant elements + to cycle over a list of values instead of inheriting the same value. + The syntax of the ''cycle()'' expression is: + +

cycle( <value># )
+ +

where <value< 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. + +

The value returned by ''cycle()'' must be determined by comparing + the inherited value I (the computed value on the parent, + or, for the root, the initial value) to the computed values + Cn returned by the n-th argument to + ''cycle()''. + For the earliest Cn such that + Cn == I, the value returned by cycle + is Cn+1. However, if this Cn + is the last value, or if there are no Cn that + equal I, the computed value of the first value is returned + instead. + +

+  /* make em elements italic, but make them normal if they're inside
+     something that's italic */
+  em { font-style: cycle(italic, normal); }
+ +
+  /* 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); }
+ +

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 + ignored.

Attribute References: ''attr()''