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

page-break-after/before not supported on <section> element #382

Closed
michaelborn opened this issue Sep 4, 2019 · 1 comment
Closed

page-break-after/before not supported on <section> element #382

michaelborn opened this issue Sep 4, 2019 · 1 comment

Comments

@michaelborn
Copy link

I noticed that page-break-before: always did nothing in my generated PDF, and after testing a bit I boiled it down to this: page-break-before: always is not supported on a <section></section> element.

Ditto for page-break-after: always.

A simple workaround is changing the <section class="break-before"></section> HTML to <div class="break-before"></div>.

I thought I'd document this here.

@danfickle
Copy link
Owner

Thanks @michaelborn,

I think what's going on here is that section is not mentioned in the renderer's default style sheet so defaults to inline display where page break properties are not supported.

We should modernise the stylesheet, but in the meantime you can add display: block to section in your styles.

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

No branches or pull requests

2 participants