blob: 537ad5241fa3632c9e75b102bd762f461edb343c [file] [log] [blame]
<html>
<head>
<title>CSS4 media query test: prefers-reduced-motion.</title>
<style type="text/css">
p { color: black; }
</style>
<script>
window.addEventListener("load", function () {
if (!window.internals)
return;
window.internals.settings.forcedPrefersReducedMotionAccessibilityValue = "on";
if (window.matchMedia("(prefers-reduced-motion)").matches)
document.getElementById("a").style.color = "green";
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches)
document.getElementById("b").style.color = "green";
window.internals.settings.forcedPrefersReducedMotionAccessibilityValue = "off";
if (!window.matchMedia("(prefers-reduced-motion)").matches)
document.getElementById("c").style.color = "green";
if (window.matchMedia("(prefers-reduced-motion: no-preference)").matches)
document.getElementById("d").style.color = "green";
}, false);
</script>
</head>
<body>
<p id="a">This text should be green.</p>
<p id="b">This text should be green.</p>
<p id="c">This text should be green.</p>
<p id="d">This text should be green.</p>
</body>
</html>