W3C home > Mailing lists > Public > www-style@w3.org > July 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 5 Jul 2012 23:45:10 -0700
Message-ID: <CAAWBYDBeK93Jvuo59uKK3pXcq0npq=Jebqqdd5TLTHwdpPVG5A@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: "www-style@w3.org list" <www-style@w3.org>
On Thu, Jul 5, 2012 at 10:36 AM, Simon Fraser <smfr@me.com> wrote:
> We recently got a WebKit bug filed that the counter() function didn't work in animation-delay; the author was trying something like:
>
> animation-delay: counter() + "s";

That, of course, is complete nonsense.  counter() returns a string,
which isn't a valid value for animation-delay.  Plus, of course, we
have no string concatenation functions.

> So the question is: where can counter() be used? http://www.w3.org/TR/css3-lists/ shows it being used in the content: property, but is that the only place? Should the spec say what it's applicability is?

It should be usable anywhere - it just returns a string based on the
value of a counter on that element.  2.1 limited it to 'content', but
there are more string-valued properties now and in the future where it
may potentially be useful.

~TJ
Received on Friday, 6 July 2012 06:45:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:56 GMT