Status: FAIL | Duration: 13ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-page/margin-boxes/content-012-print.html
<!DOCTYPE html> <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> <link rel="help" href="https://drafts.csswg.org/css-page-3/#page-based-counters"> <meta name="assert" content="Resetting or incrementing counters in margins obscure counters in the page context, and in the document"> <link rel="match" href="content-012-print-ref.html"> <style> html { counter-reset: foo 10; } @page { margin: 4em; counter-reset: foo 5; counter-increment: foo; @top-left { width: 50%; text-align: left; vertical-align: top; content: counters(foo, "."); } @top-right { width: 50%; text-align: left; vertical-align: top; counter-increment: foo; content: counters(foo, "."); } @bottom-center { text-align: left; vertical-align: top; counter-reset: foo 2; counter-increment: foo foo foo; content: counters(foo, "."); } } @page :right { counter-reset: none; @bottom-center { counter-reset: inherit; } } body { margin: 0; } </style> Page <div style="page:something;"> Another page </div> <div> Yet another page </div> <div style="break-before:page;"> Last page </div>
/css/css-page/margin-boxes/content-012-print-ref.html
<!DOCTYPE html> <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> <style> @page { margin: 0; } body { margin: 0; } .page { display: grid; grid-template-rows: 4em auto 4em; height: 100vh; margin: 0 4em; } </style> <div class="page"> <div> <div style="float:left; width:50%;">11</div> 12 </div> <div> Page </div> <div>14</div> </div> <div class="page"> <div> <div style="float:left; width:50%;">6</div> 7 </div> <div>Another page</div> <div>5</div> </div> <div class="page"> <div> <div style="float:left; width:50%;">12</div> 13 </div> <div>Yet another page</div> <div>15</div> </div> <div class="page"> <div> <div style="float:left; width:50%;">6</div> 7 </div> <div>Last page</div> <div>5</div> </div>