darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>CSS 2.1 Test Suite: Counter scope and nesting on :after</title> |
| 5 | <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#scope"> |
| 6 | <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"> |
| 7 | <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"> |
| 8 | <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"> |
| 9 | <style type="text/css"> |
| 10 | |
| 11 | body { white-space: nowrap; } |
| 12 | |
| 13 | |
| 14 | span:before { counter-increment: c 1; content: "B" counters(c,".") "-" } |
| 15 | span:after { counter-increment: c 1; content: "A" counters(c,".") "-" } |
| 16 | |
| 17 | body, span#reset:after { counter-reset: c 0; } |
| 18 | |
| 19 | </style> |
| 20 | </head> |
| 21 | <body> |
| 22 | |
| 23 | <p>The following two lines should be the same:</p> |
| 24 | |
| 25 | <div><span><span id="reset"><span></span></span></span></div> |
| 26 | <div>B1-B2-B3-A4-A4.1-A5-</div> |
| 27 | |
| 28 | </body> |
| 29 | </html> |