blob: de994bcfde52e9f520b5729180587b021a97dc59 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div id="target"></div>
<style>
#target {
color: red;
background-color: black;
width: 100px;
height: 100px;
display: none;
}
@media (any-pointer) {
#target {
color: green;
}
}
@media (any-pointer: fine) {
#target {
background-color: blue;
}
}
@media (any-pointer: coarse) {
#target {
width: 10px;
}
}
@media (any-pointer: none) {
#target {
height: 10px;
}
}
</style>
<script>
description("Test the any-pointer media feature to guard style rules.")
var target = document.getElementById('target');
function displayProperty(property) {
var testString = 'getComputedStyle(target)["' + property + '"]';
debug(testString + " = " + eval(testString));
}
displayProperty("color");
displayProperty("background-color");
displayProperty("width");
displayProperty("height");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>