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

Support for CSS GCPM ‘page groups’ #895

Open
caesar opened this issue Jul 9, 2019 · 2 comments
Open

Support for CSS GCPM ‘page groups’ #895

caesar opened this issue Jul 9, 2019 · 2 comments
Labels
feature New feature that should be supported

Comments

@caesar
Copy link

caesar commented Jul 9, 2019

When formatting books for printing, we need to be able to use different margin box content on the first page of each chapter. (In my case, specifically, empty margin boxes to suppress the page numbers and titles which are shown on other pages.)

Prince supports this via the :first pseudo-class on named pages (eg @page chapter:first), however WeasyPrint does not support this and I believe in this respect Prince is in fact not compliant with the spec, since :first is (sadly) only intended to match on the first page of a document, not on the first page of a group of named pages.

The spec-compliant way to achieve this seems to be with CSS-GCPM’s ‘page groups’, eg @page:nth(1 of chapter).
It would be great to see support for this in WeasyPrint!

@liZe liZe added the feature New feature that should be supported label Jul 9, 2019
@liZe
Copy link
Member

liZe commented Jul 9, 2019

Hello!

Yes, this feature would be useful. It had tried to solve this when closing #724, but as far as I can remember it was not that easy.

@caesar
Copy link
Author

caesar commented Jul 9, 2019

@liZe yes, I saw that. 👍

Unfortunately I can't dedicate any time to working on this myself at the moment (and #844 and #640 are also blockers for my use-case at the moment and seem much harder to fix). But I thought it would be good to have it in the issue tracker.

By the way WeasyPrint has come a long way since I last looked at it a couple of years ago, awesome work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

No branches or pull requests

2 participants