On Saturday 09 September 2006 18:58, L. David Baron wrote: > On Saturday 2006-09-09 16:51 +0000, Simon Pieters wrote: > > You're right. Here's a second shot: > > :root, h ~ section:first-of-type { counter-reset:headers; } > > > > h::before { content:counters(headers, "."); counter-increment:headers; > > } > > That won't work if some sections are nested within divs, e.g.: > > <section> > <h>should be 1</h> > <div> > <section> > <h>should be 1.1</h> > </section> > </div> > <section> > <h>should be 1.2</h> > </section> > </section> > 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. `AllanReceived on Sunday, 10 September 2006 21:50:03 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 11 September 2008 23:28:52 GMT