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


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 
>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 

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

...and be done with it.

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:26 UTC