W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: CSS 2.1: counter-reset in :before elements

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 7 Apr 2005 15:01:40 -0700
To: www-style@w3.org
Message-ID: <20050407220140.GA20033@ridley.dbaron.org>
On Thursday 2005-04-07 23:48 +0200, Allan Sandfeld Jensen wrote:
> 
> The issue regards counter-reset in :before elements such as this (taken from 
> the CSS 2.1 specification):
> H1:before {
>     content: "Chapter " counter(chapter) ". ";
>     counter-increment: chapter;  /* Add 1 to chapter */
>     counter-reset: section;      /* Set section to 0 */
> }
> H2:before {
>     content: counter(chapter) "." counter(section) " ";
>     counter-increment: section;
> }

This example is wrong, and will be corrected in the next public draft of
CSS2.1 (along with a lot of other clarifications to counters).

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
          Technical Lead, Layout & CSS, The Mozilla Foundation

Received on Thursday, 7 April 2005 22:01:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT