- From: Dave Cramer <dauwhe@gmail.com>
- Date: Tue, 25 Nov 2014 14:23:49 -0500
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: www-style list <www-style@w3.org>, Dave Cramer <Dave.Cramer@hbgusa.com>
On Tue, Nov 25, 2014 at 1:43 PM, Brad Kemper <brad.kemper@gmail.com> wrote: > > Imagine you have this: > > H1 { counter-increment: chapter } > > ...and there are 3 H1's on the page. > > I don't know when @top-center grabs counter values, but let's say it is > right after everything on the page that increments counters has already done > so. If that's the case, in your example, the value of 'chapter' would have > been incremented by the third H1. But maybe what you want is the chapter > count and text from the first H1. In that case, you would write this: > > h1:first-on-page { > copy-into: myContents contents, > chapNum counter(chapter) > } > > ...and keep the @top-center as I had it. > > Is that clear? It is to get the counter value as it is for the particular > element you want, before it gets incremented to something else. Very helpful. Thanks! Will look into how existing implementations pick counter values when they vary across a page. Dave
Received on Tuesday, 25 November 2014 19:24:19 UTC