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

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