content-counters-018.xht (1403B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: content: counters() error cases</title> 5 <link rel="author" title="L. David Baron" href="https://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 body, #test { counter-reset: c 0 f 1000; } 16 p, #test span { counter-increment: c; } 17 #test span:before { 18 content: counters(c, "."); 19 content: counters(f); 20 content: counters(f, decimal); 21 content: counters(f, decimal, "."); 22 content: counters(f, ".", decimal, decimal); 23 content: counters(f, ".", decimal, "."); 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.1 49 1.2 50 1.3 51 1.4 52 1.5 53 1.6 54 1.7 55 1.8 56 1.9 57 1.10 58 1.11 59 1.12 60 </div> 61 62 </body> 63 </html>