Re: [css3-lists] Where can the counter() function be used?

On Thu, Jul 5, 2012 at 11:05 PM, Mårten Björk <marten@gosse.se> wrote:
> I'm the one who initially filed the bug in the WebKit project. Use case: fading in a bullet list, one item at a time. Today, you have to declare an animation-delay for each item.

Yeah, as we discussed on Twitter, the use-case seems pretty obvious.
Counters have a very interesting set of scope rules which can be
pretty useful sometimes.  Variables, currently, use a much simpler
form of scope rules that won't address your use-case.

One way this could be solved would be to allow math on counter values
(which are just integers), such as allowing the counter() function
inside of calc().  Then you could write your use-case as:

animation-delay: calc(counter(delay-timer) * 1s);

~TJ

Received on Monday, 9 July 2012 07:17:47 UTC