Skip to content

Instantly share code, notes, and snippets.

@MurakamiShinyu
Created February 21, 2023 06:40
Show Gist options
  • Save MurakamiShinyu/8ba399c0dcfc87c093ffc55e8333102a to your computer and use it in GitHub Desktop.
Save MurakamiShinyu/8ba399c0dcfc87c093ffc55e8333102a to your computer and use it in GitHub Desktop.
issue1131: blank page selector misapplied
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
@page {
@top-center {
content: "Normal Page";
}
@bottom-center {
content: counter(page);
}
}
@page :blank {
color: red;
@top-center {
content: "Blank Page";
}
}
nav li a::after {
content: leader(".") " " target-counter(attr(href), page);
}
section {
break-before: page;
}
.recto {
break-before: recto;
}
</style>
</head>
<body>
<nav>
<h2>Table of Contents</h2>
<ol>
<li><a href="#One">One</a></li>
</ol>
</nav>
<section id="One">
<h2>One</h2>
<p>This page is a Normal Page.</p>
</section>
<section class="recto">
<h2>Two</h2>
<p>This page should be a Normal Page (not a Blank Page).</p>
<p><code>break-before: recto;</code> is specified but no blank page will be generated.</p>
</section>
<section>
<h2>Three</h2>
<p>This page is a Normal Page.</p>
</section>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment