W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [css-page] @page rule should allow definition of page number formatting details

From: Eliot Kimber via GitHub <sysbot+gh@w3.org>
Date: Sat, 09 Dec 2017 17:50:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-350493596-1512841803-sysbot+gh@w3.org>
I've realized an additional requirement: The ability to have single counter names where the  named counter is constructed from other counters.

The use case is point pages representing pages inserted between previously-published pages, e.g. "22", "22.1", "22.2", "23", where pages "22.1" and "22.2" represent page sequence of inserted pages.

As for the more general problem described in this issue, the requirement is that a generic counter reference be usable such that the same counter reference will return the correct number for both the non-point and point pages.

So if the counter referenced in count is "page", it would be necessary to be able to do something like:

``
 @page {
       counter-increment: page;  /* "normal" page number for non-point pages */
       counter-increment: base-page; /* Used to construct point pages */
  }
@page point-pages:first {
   counter-reset: point-page;
    @counter page {
           content: counter(base-page) '.' counter(point-page);
    }
}

@page point-pages {
   counter-increment: point-page;
}
``

With this type of counter definition, references can then blindly refer to counter "page" and get the correct value for all page sequences.

-- 
GitHub Notification of comment by drmacro
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1108#issuecomment-350493596 using your GitHub account
Received on Saturday, 9 December 2017 17:50:09 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC