1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Strict//EN">
4 <title>CSS Test: :nth-child selector 'odd' keyword case sensitivity
</title>
5 <style type=
"text/css">
13 <p>The test passes if the odd numbered DIVs are green.
</p>
18 <div id=
"testresult" style=
"color: blue">Running
</div>
19 <script type=
"text/javascript">
20 if (window
.testRunner
)
21 testRunner
.dumpAsText();
23 function ArrayContains(array
, value
, ci
)
25 ci
= ci
== true ? true : false;
26 for (var i
= 0; i
< array
.length
; i
++)
28 if (ci
&& array
[i
].toLowerCase() == value
.toLowerCase())
32 else if (array
[i
] == value
)
44 var greenValues
= new Array("green", "#008000", "rgb(0, 128, 0)");
46 var elem
= document
.getElementById("test");
47 var val
= getComputedStyle(elem
.children
[0], null).getPropertyValue("color");
48 if (ArrayContains(greenValues
, val
, false))
50 document
.getElementById("testresult").innerHTML
= "Pass";
56 document
.getElementById("testresult").innerHTML
= "Fail";