string-set-009

GCPM string-set with page and pages counters

WeasyPrint

This browser

Flags
paged
Assertion
Test checks that a string can be set to the page and pages counters

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 <meta charset="utf-8">
 4 <title>CSS Test: GCPM string-set with page and pages counters</title>
 5 <link href="mailto:dauwhe@gmail.com" rel="author" title="Dave Cramer">
 6 <link href="http://www.w3.org/TR/css-gcpm-3/#setting-named-strings-the-string-set-pro" rel="help">
 7 <meta content="paged" name="flags">
 8 <meta content="Test checks that a string can be set to the page and pages counters" name="assert">
 9 <style>
10   @page {
11    @top-center {
12    content: string(title);
13    }
14 
15   }
16 
17  h1 {
18  string-set: title counter(page) ' of ' counter(pages);
19  }
20 
21 </style>
22 </head>
23 <body>
24 <h1>Chapter Title</h1>
25 <p>Test passes if “1 of 1” appears in the running head.</p>
26 
27 
28 </body></html>