4 #styled { color: green }
5 @media all and(min-width:
2px) { #styled { color: red; } }
6 @media all and(max-width:
1px) { #styled { color: red; } }
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var element
= document
.getElementById('styled');
14 var computedColor
= window
.getComputedStyle(element
).color
;
15 if (computedColor
=== "rgb(0, 128, 0)")
16 document
.getElementById("result").textContent
= "SUCCESS";
18 document
.getElementById("result").textContent
= "FAILURE: " + computedColor
;
22 <body onload=
"runTest();">
23 <div id=
"styled">This should be green
</div>
24 <div id=
"result">FAILURE
</div>