From 7e291e1e68b7dd89b97d4d5cc76f722bed7da711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Tue, 28 Jul 2026 22:33:23 +0200 Subject: [PATCH] Guard placeholder glow/wave animations behind prefers-reduced-motion --- scss/_placeholder.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scss/_placeholder.scss b/scss/_placeholder.scss index 7242dcb04b70..e05056396347 100644 --- a/scss/_placeholder.scss +++ b/scss/_placeholder.scss @@ -1,4 +1,5 @@ @use "colors" as *; +@use "config" as *; @use "functions" as *; @use "mixins/tokens" as *; @@ -49,6 +50,12 @@ $placeholder-tokens: defaults( .placeholder-glow { .placeholder { animation: placeholder-glow 2s ease-in-out infinite; + + @if $enable-reduced-motion { + @media (prefers-reduced-motion: reduce) { + animation: none; + } + } } } @@ -62,6 +69,12 @@ $placeholder-tokens: defaults( mask-image: linear-gradient(130deg, $black 55%, rgb(0 0 0 / calc(1 - var(--placeholder-opacity-min))) 75%, $black 95%); mask-size: 200% 100%; animation: placeholder-wave 2s linear infinite; + + @if $enable-reduced-motion { + @media (prefers-reduced-motion: reduce) { + animation: none; + } + } } @keyframes placeholder-wave {