Skip to content

Commit

Permalink
test: Update the nth page selector and page counter reset tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakamiShinyu committed Feb 28, 2021
1 parent 949bee6 commit d56feda
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
13 changes: 9 additions & 4 deletions packages/core/test/files/file-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,20 @@ module.exports = [
category: "Nth page selector",
files: [
{
file: ["nth-page/nth-page.html", "nth-page/nth-page.html"],
title: "nth() page selector & blank page between two docs",
file: "nth-page/nth-page.html",
title: "nth() page selector",
},
{
file: "nth-page/nth-page-counter-reset.html",
title: "nth() page selector & page counter reset",
},
{
file: [
"nth-page/nth-page.html",
"nth-page/nth-page-counter-reset.html",
"nth-page/nth-page-counter-reset.html",
"nth-page/nth-page.html",
],
title: "nth() page selector & page counter reset",
title: "nth() page selector & page counter reset in multiple documents",
},
],
},
Expand Down
28 changes: 25 additions & 3 deletions packages/core/test/files/nth-page/nth-page-counter-reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,21 @@
margin: auto;
table-layout: fixed;
}
.test td {
text-align: center;
}
.test td:first-child {
text-align: left;
}
.test td:last-child {
text-align: right;
}
code {
font-size: smaller;
}
h1 {
font-size: large;
}
body {
margin: 0;
line-height: 1.2;
}
</style>
</head>
Expand Down Expand Up @@ -245,5 +252,20 @@ <h1>Nth() page selector &amp; page counter reset</h1>
<code>counter-reset: page 100</code> (incremented to 101).
</p>
</div>
<div class="test">
<p>The 10th page header/footer should be:</p>
<table>
<tr>
<td></td>
<td></td>
<td>:nth(even)</td>
</tr>
<tr>
<td>:nth(n+5)</td>
<td></td>
<td>Page 102</td>
</tr>
</table>
</div>
</body>
</html>
15 changes: 11 additions & 4 deletions packages/core/test/files/nth-page/nth-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,21 @@
margin: auto;
table-layout: fixed;
}
.test td {
text-align: center;
}
.test td:first-child {
text-align: left;
}
.test td:last-child {
text-align: right;
}
code {
font-size: smaller;
}
h1 {
font-size: large;
}
body {
margin: 0;
line-height: 1.2;
}
</style>
</head>
Expand All @@ -103,7 +110,7 @@ <h1>Nth() Page Selector</h1>
</table>
<p>
* If this is not the first doc, “:first” will not appear, and the Page
numbering will be consecutive from the previous doc. A blank page is
numbering will be consecutive from the previous doc. A blank page may be
inserted by <code>:root { break-before: recto; }</code>.
</p>
</div>
Expand Down

1 comment on commit d56feda

@vercel
Copy link

@vercel vercel bot commented on d56feda Feb 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.