From 13331aae80483842e2de1693e2dde9cefb32fa67 Mon Sep 17 00:00:00 2001 From: login000 <34250284+login000@users.noreply.github.com> Date: Thu, 7 May 2020 14:34:47 +1000 Subject: [PATCH] Adds "prefers-reduced-motion" media query Adds prefers-reduced-motion media query to not show blinking _ if the user prefers reduced motion (as indicated by their OS settings). --- style.css | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/style.css b/style.css index 10990e8..b9a2c6f 100644 --- a/style.css +++ b/style.css @@ -67,12 +67,14 @@ hr { from { content: "_"; } to { content: ""; } } -h1::after { - content: "_"; - animation-name: cursor; - animation-iteration-count: infinite; - animation-timing-function: cubic-bezier(1.0,0,0,1.0); - animation-duration: 1s; +@media not (prefers-reduced-motion: reduce) { + h1::after { + content: "_"; + animation-name: cursor; + animation-iteration-count: infinite; + animation-timing-function: cubic-bezier(1.0,0,0,1.0); + animation-duration: 1s; + } } h1 { text-transform: uppercase;