- From: Simon Pieters <zcorpan@hotmail.com>
- Date: Sun, 10 Sep 2006 22:59:50 +0000
- 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 UTC