Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
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" class="reftest-wait">
3 <head>
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"/>
9 <meta http-equiv="Content-Script-Type" content="text/javascript"/>
10 <style type="text/css">
12 #test, .reset { counter-reset: c; }
13 .increment:before, .use:before { content: counters(c, ".") "-"; }
14 .increment { counter-increment: c; }
16 </style>
17 <script type="text/javascript">
19 function run() {
20 document.getElementById("one").removeAttribute("class");
21 document.getElementById("two").setAttribute("class", "increment");
22 document.getElementById("three").setAttribute("style", "counter-increment: c");
23 document.documentElement.removeAttribute('class');
24 }
26 document.addEventListener("MozReftestInvalidate", run, false);
27 </script>
28 </head>
29 <body>
31 <div id="test"><span id="one" class="increment"></span><span><span class="reset"><span class="increment"></span><span id="two" class="increment"></span></span></span><span id="three" class="use"></span><span class="increment"></span></div>
33 </body>
34 </html>