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

Re: [CSS21] Nested Counters and Scope

From: Allan Sandfeld Jensen <kde@carewolf.com>
Date: Fri, 22 Jul 2005 20:36:30 +0200
To: www-style@w3.org
Message-Id: <200507222036.30880.kde@carewolf.com>

On Friday 22 July 2005 19:07, L. David Baron wrote:
> 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.)
>
Sorry to rant, but I have to ask:

Why have rules that a redundant and pointless?

It would make sense if counter-reset and counter-increment properties was 
additive, but they cascade like all other properties, which means that the 
only way to do two resets on the element is to declare them both at the same 
time: {counter-reset: dummy 0 dummy 1}. Being able to do that is just 
pointless. Having to waste time defining the behaviour of pointless 
declarations is even more pointless.

`Allan
Received on Friday, 22 July 2005 18:36:47 GMT

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