- From: Joshua Cranmer <Pidgeot18@verizon.net>
- Date: Mon, 09 Apr 2012 16:58:04 -0500
- To: www-style@w3.org
On 4/9/2012 3:44 PM, Tab Atkins Jr. wrote:
> The only way I can think of doing what you want is to force cycle() to
> take an ident, and have it compute to the ith entry, where i = (number
> of ancestors with a cycle using the same ident) mod (number of entries
> in this cycle). This doesn't require any tricky comparison at all
> unless we want to add some for aesthetic purposes - cycle()s with the
> same ident can have different values in each entry, and even different
> numbers of entries.
One problem with this design is as follows. If I have a style like so:
ul.crazycool { list-style-type: cycle(coola, coolb, coolc); }
Then the fragment "<ul><ul class=crazycool>" would cause the latter to
be styled with coolb instead of coola, which is probably not the result
the user desired. Nor is there a way to force the intended result that
is independent of the hierarchy of the element, so any change even to
the UA stylesheet could wreck a user's stylesheet which is intended to
override everything else.
--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Received on Monday, 9 April 2012 21:58:48 UTC