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

feat(core): Support the :nth() page selector #700

Merged
merged 1 commit into from
Feb 26, 2021
Merged

Conversation

MurakamiShinyu
Copy link
Member

Spec: https://drafts.csswg.org/css-gcpm-3/#document-page-selectors

Notes:

Test files:
https://raw.githack.com/vivliostyle/vivliostyle.js/master/packages/core/test/files/#Nth_page_selector

  • packages/core/test/files/nth-page/nth-page.html
  • packages/core/test/files/nth-page/nth-page-counter-reset.html

Fixes #667

Spec: https://drafts.csswg.org/css-gcpm-3/#document-page-selectors

Notes:
- The `:nth(An+B)` syntax is supported but the `:nth(An+B of <custom-ident>)` is not
  because the named pages are not yet supported.
- In multi-document publications, the `:nth(1)` matches the first page of each document,
  but the `:first` matches only the first page of the first document.
  (see: #667 (comment) )

Test files:
- packages/core/test/files/nth-page/nth-page.html
- packages/core/test/files/nth-page/nth-page-counter-reset.html

Fixes #667
@MurakamiShinyu MurakamiShinyu self-assigned this Feb 26, 2021
@vercel
Copy link

vercel bot commented Feb 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vivliostyle/vivliostyle/3TsZZDrL9iLytAYCL4tjmg7hsZuv
✅ Preview: https://vivliostyle-git-feat-nth-page-vivliostyle.vercel.app

@MurakamiShinyu
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant