RE: [css3-gcpm] counter() and "special" values

Melinda Grant wrote:

 > > In the Paged Media draft from 2004, the "page" and "pages" 
 > > counters were defined:
 > > 
 > >   http://www.w3.org/TR/2004/CR-css3-page-20040225/#number-of-pages
 > > 
 > > The "page" counter is still referred to in the latest draft:
 > > 
 > >   http://www.w3.org/TR/2006/WD-css3-page-20061010/#page-based-counters
 > > 
 > > But the magic is gone. That is, there is no text that 
 > > prescribes the creation of a counter called "page" unless it 
 > > appears explicitly.

 > The 'magic' for "pages" in the 2004 draft was clear; but we removed
 > the "pages" functionality to keep css3-page limited to features
 > with sufficient implementation support to advance to REC. (I
 > thought we were migrating it to css3-gcpm, but that's apparently
 > incorrect.)

That may have been a mistake on my part, I'll add it there.

 > Once the verbiage concerning "pages" was removed, there didn't seem
 > to be any normative verbiage remaining providing magic for "page".

Right.

 > If we add normative text indicating that a counter named "page" is
 > automatically created and initialized to a value of "1" and
 > implicitly incremented by page breaks, one question that arises is
 > what should then happen in this case:

 > >    @page { counter-increment: page { @bottom-center {
 > >      content: "Page " counter(page) " of " counter(pages);
 > >    }}
 > 
 > Should the explicit counter-increment occur in addition to the
 > implicit increment, causing the value displayed for counter(page)
 > to increment by 2's? Or should the explicit counter-increment
 > create a counter that replaces the automagic "page" counter, and
 > therefore the above source produces the same output as:
 >
 > 
 >     @page { { @bottom-center {
 >       content: "Page " counter(page) " of " counter(pages);
 >     }}
 > 
 > (My tentative preference is that they should produce the same output.)

I agree that they should produce the same output. However, I don't
think about it as creating a new counter with the same name; there is
only one counter with the name "page" and it is always incremented by
one, no matter what the style sheet says.

The main reason for wanting to avoid two counters with the same name
is that the 'counter-reset' property must be able to reset all
counters, including the "page" counter. 

 > Do we have at least two implementations of "pages", so that we can
 > add it back to css3-page?

I only know of one, Prince.

 > (Sorry for the delayed response.)

Likewise.

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Tuesday, 7 August 2007 11:49:12 UTC