Skip to content

Commit 25f4d2f

Browse files
committed
Add advanced tests of avoid-all
1 parent 950c355 commit 25f4d2f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/manual/pagebreaks.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
background-color: aqua;
4040
border: 1px solid black;
4141
}
42+
43+
/* Table styling */
44+
table {
45+
border-collapse: collapse;
46+
}
47+
td {
48+
border: 1px solid black;
49+
}
4250
</style>
4351
</head>
4452

@@ -68,6 +76,22 @@
6876
<p class="avoid fullpage">Full-page element (should start on new page using avoid-all/css/specify).</p>
6977
<p>No effect (for spacing).</p>
7078
<p class="avoid bigger">Even bigger element (should continue normally, because it's more than a page).</p>
79+
80+
<!-- Advanced avoid-all tests. -->
81+
<div>
82+
<p>No effect inside parent div (testing avoid-all - no break yet because parent is more than a page).</p>
83+
<p class="big">Big element inside parent div (testing avoid-all - should have break before this).</p>
84+
</div>
85+
<table>
86+
<tr>
87+
<td>Cell 1-1 - start of new page</td>
88+
<td>Cell 1-2 - start of new page</td>
89+
</tr>
90+
<tr class="big">
91+
<td>Cell 2-1 - start of another new page</td>
92+
<td>Cell 2-2 - start of another new page</td>
93+
</tr>
94+
</table>
7195
</div>
7296

7397
<!-- Include html2pdf bundle. -->

0 commit comments

Comments
 (0)