1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
4 <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
5 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters">
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 <meta http-equiv="Content-Style-Type" content="text/css"></meta>
9 <meta http-equiv="Content-Script-Type" content="text/javascript"></meta>
10 <style type="text/css">
12 body { white-space: nowrap; }
15 #test, .reset { counter-reset: c; }
16 .increment:before, .use:before { content: counters(c, ".") "-"; }
17 .increment { counter-increment: c; }
20 <script type="text/javascript">
23 document.getElementById("one").removeAttribute("class");
24 document.getElementById("two").setAttribute("class", "increment");
25 document.getElementById("three").setAttribute("style", "counter-increment: c");
30 <body onload="setTimeout('run()', 0)">
32 <p>The following two lines should be the same:</p>
34 <div id="test"><span class="increment" id="one"></span><span><span class="reset"><span class="increment"></span><span class="increment" id="two"></span></span></span><span class="use" id="three"></span><span class="increment"></span></div>
36 <div id="reference">0.1-0.2-1-2-</div>