W3C home > Mailing lists > Public > www-style@w3.org > December 2011

[css3-lists] counters "self-nesting"

From: Andrian Cucu <acucu@adobe.com>
Date: Thu, 8 Dec 2011 13:29:53 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <CB068871.10871%acucu@adobe.com>
Hi,

The following statement is used, in section 8.1. on nested counters and scope, to describe "self-nesting":
Counters are "self-nesting", in the sense that re-using a counter in a child element automatically creates a new instance of the counter.

Does this mean that the following snippet should create 2 counter instances and thus it should render (1) and (1)?
<style>
div {
counter-increment: div-count;
}
div:before
{
content: "(" counter(div-count) ") ";
}
</style>
<div>
<div>
</div>
</div>

Currently user agents display (1) and (2) for this snippet.

Thank You,
-Andrian
Received on Friday, 9 December 2011 09:56:08 GMT

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