string-set-006

GCPM string-set with content(before)

WeasyPrint

This browser

Flags
paged
Assertion
Test checks that a named string can be set to the content of the before pseudo-element

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 <meta charset="utf-8">
 4 <title>CSS Test: GCPM string-set with content(before)</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 named string can be set to the content of the before pseudo-element" name="assert">
 9 <style>
10   @page {
11    @top-center {
12    content: string(title);
13    }
14   }
15 
16  h1 {
17    string-set: title content(before);
18  }
19 
20  h1::before {
21  content: 'before-';
22  }
23 
24 
25 </style>
26 </head>
27 <body>
28 <h1>Chapter Title</h1>
29 <p>Test passes if “before-” appears in the running head at the top of the page.</p>
30 
31 
32 </body></html>