4 #outer
> div { font-weight: bolder; }
5 #outer
> div#bolder { font-weight: bolder; }
6 #outer
> div#lighter { font-weight: lighter; }
8 <script src=
"../resources/js-test.js"></script>
12 <div id=
"bolder"></div>
13 <div id=
"lighter"></div>
15 <div id=
"console"></div>
17 description('Test that font-weight: bolder and font-weight: lighter are not cumulative when multiple selectors apply.');
20 ["100" , "100" , "normal", "100"],
21 ["200" , "200" , "normal", "100"],
22 ["300" , "300" , "normal", "100"],
23 ["400" , "normal", "bold" , "100"],
24 ["normal", "normal", "bold" , "100"],
25 ["500" , "500" , "bold" , "100"],
26 ["600" , "600" , "900" , "normal"],
27 ["700" , "bold" , "900" , "normal"],
28 ["bold" , "bold" , "900" , "normal"],
29 ["800" , "800" , "900" , "bold"],
30 ["900" , "900" , "900" , "bold"],
33 var outer
= document
.getElementById("outer");
34 var bolder
= document
.getElementById("bolder");
35 var lighter
= document
.getElementById("lighter");
36 for(var i
=0; i
<table
.length
; i
++) {
37 outer
.style
.fontWeight
= table
[i
][0];
38 shouldBeEqualToString('getComputedStyle(outer).fontWeight', table
[i
][1]);
39 shouldBeEqualToString('getComputedStyle(bolder).fontWeight', table
[i
][2]);
40 shouldBeEqualToString('getComputedStyle(lighter).fontWeight', table
[i
][3]);