html: support CSS page-break-after: avoid
Open
Nobody has claimed this yet.
Feature Request
- Dominant language
- JavaScript
- Stars
- 31.3k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
When I export to PDF, I get long table tables. I need it to not break after thead and tbody > tr:first-child. I wrote it like this:
table thead, table tbody > tr:first-child {
page-break-after: avoid;
}
but it doesn't work. Can you give me some advice?


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the HTML/CSS example and the reported PDF export behavior, then trace the export path used by jsPDF. Done means the sample table honors the requested page-break-after behavior in the generated PDF, with a reproducible check for thead and tbody > tr:first-child.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100