W3C home > Mailing lists > Public > www-style@w3.org > June 2007

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

From: Grant, Melinda <melinda.grant@hp.com>
Date: Fri, 22 Jun 2007 01:40:31 -0000
Message-ID: <78A3602ADF54BA4EAB53F378BF55588B0159F52B@G3W0067.americas.hpqcorp.net>
To: Håkon Wium Lie <howcome@opera.com>, "Michael Day" <mikeday@yeslogic.com>
Cc: <del@alum.mit.edu>, <www-style@w3.org>


Håkon Lie said [1]:

> 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. Is this what we want? 

This may be a matter of inadvertent editor error.  (I suppose most editor errors are inadvertent. ;-) Anyway, mea most probably culpa.

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.) Once the verbiage concerning "pages" was removed, there didn't seem to be any normative verbiage remaining providing magic for "page".

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

If the explicit declaration should result in counting by 2's, how should that affect the "pages" counter?

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

(Sorry for the delayed response.)

Best wishes,

Melinda

[1] http://www.w3.org/2002/02/mid/18013.22184.258873.595103@gargle.gargle.HOWL;list=www-style
Received on Friday, 22 June 2007 01:56:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:51 GMT