Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 'pages' counter #367

Merged
merged 2 commits into from
Jul 4, 2017
Merged

Implement 'pages' counter #367

merged 2 commits into from
Jul 4, 2017

Conversation

kwkbtr
Copy link
Contributor

@kwkbtr kwkbtr commented Jul 4, 2017

  • Spec: https://drafts.csswg.org/css-page/#page-based-counters
  • Note that the current implementation does not re-layout the pages but merely substitute the text contents generated by the 'pages' counter.
    It means that you need to make sure that dimension and position of a pseudo-element or a region in which 'pages' counter is rendered does not depend on the actual content of the counter.
    Such implementation is chosen in order to:
    • avoid performance degradation ('pages' counter is often used in all pages, so triggering re-layout of the pages make the total processing time twice), and
    • workaround a bug of page floats when re-layout of the pages is triggered.

- Spec: https://drafts.csswg.org/css-page/#page-based-counters
- Note that the current implementation does not re-layout the pages but merely substitute the text contents generated by the 'pages' counter.
  It means that you need to make sure that dimension and position of a pseudo-element or a region in which 'pages' counter is rendered does not depend on the actual content of the counter.
  Such implementation is chosen in order to:
    - avoid performance degradation ('pages' counter is often used in all pages, so triggering re-layout of the pages make the total processing time twice), and
    - workaround a bug of page floats when re-layout of the pages is triggered.
@kwkbtr kwkbtr merged commit 3f57d4b into master Jul 4, 2017
@kwkbtr kwkbtr deleted the pages_counter-r#95 branch July 4, 2017 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant