W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: Counter-reset on pseudo class creates new counter-scope

From: Allan Sandfeld Jensen <kde@carewolf.com>
Date: Mon, 11 Jan 2010 13:56:35 +0100
To: www-style@w3.org
Message-Id: <201001111356.35959.kde@carewolf.com>
On Tuesday 05 January 2010, Boris Zbarsky wrote:
> Sure. A reset only creates a new instance if there is a counter with
> that name is already in scope solely due to a reset on an ancestor or
> previous sibling of an ancestor.  A reset for a counter that's in scope
> due to a reset on a previous sibling will just reset the existing counter.
Which is why the trick is to use:
ol:before {
	content: "";
ol li {
	counter-increment: section;

Received on Monday, 11 January 2010 12:57:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:42 UTC