content-counter-016

content: counter() error cases

WeasyPrint

This browser

Flags
invalid

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: content: counter() error cases</title>
 5   <link rel="author" title="L. David Baron" href="http://dbaron.org/">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counter-styles">
 9   <meta name="flags" content="invalid">
10   <style type="text/css">
11 
12   body { white-space: nowrap; }
13 
14 
15   #test { counter-reset: c 0 f 1000; }
16   #test span { counter-increment: c; }
17   #test span:before {
18     content: counter(c);
19     content: counter(f, ".");
20     content: counter(f, ".", decimal);
21     content: counter(f, decimal, ".");
22     content: counter(f, decimal, decimal);
23     content: counter(f, unknowntype);
24   }
25 
26   </style>
27  </head>
28  <body>
29 
30  <p>The following two lines should look the same:</p>
31 
32  <div id="test">
33    <span></span>
34    <span></span>
35    <span></span>
36    <span></span>
37    <span></span>
38    <span></span>
39    <span></span>
40    <span></span>
41    <span></span>
42    <span></span>
43    <span></span>
44    <span></span>
45  </div>
46 
47  <div>
48    1
49    2
50    3
51    4
52    5
53    6
54    7
55    8
56    9
57    10
58    11
59    12
60  </div>
61 
62  </body>
63 </html>