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: Mon, 9 Jul 2012 07:32:24 -0700
Message-ID: <CAAWBYDACYjGUHL2G9gdcb54WmyzBJiK1RtwAzvx_f9hUZZZh+g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
On Mon, Jul 9, 2012 at 7:24 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 7/9/12 3:16 AM, Tab Atkins Jr. wrote:
>> 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);
> I must be missing something.
> Counter values depend on whether boxes are present or not, no?
> It seems pretty odd to me to require that values of some properties depend
> on whether some completely unrelated boxes far away in the DOM are present.
> It might also be somewhat difficult to implement correctly in the face of
> dynamic changes.
> -Boris
> P.S.  Note that "boxes are present" does not actually map directly to
> computed display values, by the way.  It probably does map to used display
> values...

You must be missing something, since what you just described is how
counters always work.  It's just that in the past they've been limited
to being used in 'content' only.

Received on Monday, 9 July 2012 14:33:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:35:12 UTC