W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: [CSS21] Possible counters() limitation?

From: Simon Pieters <zcorpan@hotmail.com>
Date: Sun, 10 Sep 2006 22:59:50 +0000
Message-ID: <BAY109-F40F97BE1FAC2F455AC571CB4350@phx.gbl>
To: kde@carewolf.com, www-style@w3.org

Hi,

From: Allan Sandfeld Jensen <kde@carewolf.com>
>In my opinion that is not a limitation of counters. That is a limitation of
>selectors. Something like the first descendant of type should be 
>selectable,
>and adding more pseudotypes is not the solution.

What's a pseudotype? If Selectors should be extended to allow selecting 
first descendant of type, then a new pseudo-class probably has to be used. 
For instance, something along the lines of:

   :root, :whichever-comes-first(h ~ section, h ~ * section) { 
counter-reset:headers; }

The sectioning element can either be a sibling or a descendant of a sibling, 
and you want the one that comes first.

Personally I think the selectors are getting too complicated. The above 
solution seems a bit non-initiutive to me. It probably isn't fool-proof 
either. It should be possible to just list the "sectioning" elements like 
so:

   :root, section { counters-reset:headers; /* note the "counters" with an s 
*/ }

...and be done with it.

Regards,
Simon Pieters
Received on Sunday, 10 September 2006 23:00:03 GMT

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