string-set-012

GCPM string-set to attribute value

WeasyPrint

This browser

Flags
paged
Assertion
Test checks that a string can be set to the value of an attribute

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 <meta charset="utf-8">
 4 <title>CSS Test: GCPM string-set to attribute value</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 value of an attribute " name="assert">
 9 
10 <style>
11   @page {
12    @top-center {
13    content: string(header);
14    }
15   }
16 
17  h1 {
18  string-set: header attr(title);
19  }
20 
21 
22 </style>
23 </head>
24 <body>
25 <h1 title="Hello, World">Chapter Title</h1>
26 <p>Test passes if running head text reads “Hello, World”.
27 
28 
29 
30 
31 
32 
33 </p></body></html>