]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Guard placeholder glow/wave animations behind prefers-reduced-motion (#42769) main
authorJulien Déramond <juderamond@gmail.com>
Tue, 28 Jul 2026 20:54:52 +0000 (22:54 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Jul 2026 20:54:52 +0000 (22:54 +0200)
scss/_placeholders.scss

index 6e32e1cdb9b143cacbc44888700d3bdba447f3f1..05e753931916dc0c020d033396ae730720f5a060 100644 (file)
 .placeholder-glow {
   .placeholder {
     animation: placeholder-glow 2s ease-in-out infinite;
+
+    @if $enable-reduced-motion {
+      @media (prefers-reduced-motion: reduce) {
+        animation: none;
+      }
+    }
   }
 }
 
   mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $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 {