27 lines
757 B
HTML
27 lines
757 B
HTML
<html>
|
|
<head>
|
|
<title>CSS4 media query test: monochrome.</title>
|
|
<style type="text/css">
|
|
p { color: black; }
|
|
</style>
|
|
<script>
|
|
window.addEventListener("load", function () {
|
|
if (!window.internals)
|
|
return;
|
|
|
|
window.internals.settings.forcedDisplayIsMonochromeAccessibilityValue = "on";
|
|
if (window.matchMedia("(monochrome)").matches)
|
|
document.getElementById("a").style.color = "#888";
|
|
|
|
window.internals.settings.forcedDisplayIsMonochromeAccessibilityValue = "off";
|
|
if (!window.matchMedia("(monochrome)").matches)
|
|
document.getElementById("b").style.color = "#888";
|
|
}, false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p id="a">This text should be mid grey #888.</p>
|
|
<p id="b">This text should be mid grey #888.</p>
|
|
</body>
|
|
</html>
|