counters-hidden-000

Counter properties on 'content: none' pseudo-elements

WeasyPrint

This browser

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: Counter properties on 'content: none' pseudo-elements</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#undisplayed-counters">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content">
 9   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter">
10   <style type="text/css">
11 
12   body { white-space: nowrap; }
13 
14 
15   div { counter-reset: c }
16   #one:before { counter-increment: c }
17   #two:before { content: counter(c) }
18 
19   </style>
20  </head>
21  <body>
22 
23  <p>The following should be identical:</p>
24 
25  <div><span id="one"></span><span id="two"></span></div>
26  <div>0</div>
27 
28  </body>
29 </html>