From c69b8137d79d58652d30fa2f94646080141c568b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 10 Mar 2024 00:55:34 +0200 Subject: [PATCH] Reduced motion disables background transition --- public/scripts/power-user.js | 1 + public/style.css | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 2fa02dd37..863f59d19 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -461,6 +461,7 @@ function switchReducedMotion() { const overrideDuration = power_user.reduced_motion ? 0 : ANIMATION_DURATION_DEFAULT; setAnimationDuration(overrideDuration); $('#reduced_motion').prop('checked', power_user.reduced_motion); + $('body').toggleClass('reduced-motion', power_user.reduced_motion); } function switchCompactInputArea() { diff --git a/public/style.css b/public/style.css index ff27b1250..9a367f466 100644 --- a/public/style.css +++ b/public/style.css @@ -419,6 +419,11 @@ hr { transition: background-image 0.5s ease-in-out; } +body.reduced-motion #bg1, +body.reduced-motion #bg_custom { + transition: none; +} + #version_display { padding: 5px; opacity: 0.8; @@ -3806,4 +3811,4 @@ a { height: 100vh; z-index: 9999; } -} \ No newline at end of file +}