string-set-003

GCPM String-set with content(text)

WeasyPrint

This browser

Flags
paged
Assertion
Test checks that a string can be set to the text value of an element, using the explicit content(text) syntax

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 <meta charset="utf-8">
 4 <title>CSS Test: GCPM String-set with content(text)</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 
 8 <meta content="paged" name="flags">
 9 <meta content="Test checks that a string can be set to the text value of an element, using the explicit content(text) syntax" name="assert">
10 <style type="text/css">
11   @page {
12    @top-center {
13    content: string(title);
14    }
15   }
16 
17  h1 {
18    string-set: title content(text);
19  }
20 </style>
21 </head>
22 <body>
23 <h1>Chapter Title</h1>
24 <p>Test passes if the text “Chapter Title” appears in the running head at the top of the page.</p>
25 <!--AH errors out with content(text) rather than content()-->
26 
27 
28 </body></html>