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

Re: [CSS21] Nested Counters and Scope

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 22 Jul 2005 10:07:41 -0700
To: www-style@w3.org
Message-ID: <20050722170741.GA1178@ridley.dbaron.org>
On Friday 2005-07-22 10:58 +0100, Geoff Soutter wrote:
> On Thu, 2005-07-21 at 11:58 -0500, Boris Zbarsky wrote:
> > Geoff Soutter wrote:
> > > What exactly is meant by a "later 'counter-reset' on the same element"?
> > 
> > p { counter-reset: mycounter 1 mycounter 2 mycounter; }
> > 
> > That has three counter-resets on the same element for the same counter; the 
> > scope of the reset to 1 does not include nodes that are in the scope of the 
> > reset to 2; the scope of the reset to 2 does not include nodes that are in the 
> > scope of the reset to 0.
> 
> OK, I think I understand what the spec means re later counter resets.
> 
> I am not exactly an expert on this subject, but it seems to me redundant
> to defining scopes for all the references to the same counter within a
> single counter-reset when only the last one has an external effect. 
> 
> Would it not be better to wield Occam's Razor on the earlier ones?

Why have a separate rule when the same rule that applies to
counter-resets on siblings works too?  (Also note that for
counter-increment, the two rules are different, and this keeps
counter-reset and counter-increment consistent.)

-David

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

Received on Friday, 22 July 2005 17:08:05 GMT

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