aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/stylesheets/utilities/_reduce-motion.scss
diff options
context:
space:
mode:
authorsadbeast <sadbeast@sadbeast.com>2024-01-31 17:47:56 -0800
committersadbeast <sadbeast@sadbeast.com>2024-01-31 17:47:56 -0800
commit332ec93366315fa1ed7b4acd7a3407c96e8ddfa7 (patch)
tree6ae553317f12a7a6a29c849c8805ffab96436dc2 /app/assets/stylesheets/utilities/_reduce-motion.scss
downloadtd-main.tar.gz
td-main.tar.bz2
initial mistakeHEADmain
Diffstat (limited to 'app/assets/stylesheets/utilities/_reduce-motion.scss')
-rw-r--r--app/assets/stylesheets/utilities/_reduce-motion.scss27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/stylesheets/utilities/_reduce-motion.scss b/app/assets/stylesheets/utilities/_reduce-motion.scss
new file mode 100644
index 0000000..ecfd6fd
--- /dev/null
+++ b/app/assets/stylesheets/utilities/_reduce-motion.scss
@@ -0,0 +1,27 @@
+@if $enable-transitions and $enable-important {
+ /**
+ * Reduce Motion Features
+ */
+
+ // Based on :
+ // - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css
+ // ––––––––––––––––––––
+
+ // 1. Remove animations when motion is reduced (opinionated)
+ // 2. Remove fixed background attachments when motion is reduced (opinionated)
+ // 3. Remove timed scrolling behaviors when motion is reduced (opinionated)
+ // 4. Remove transitions when motion is reduced (opinionated)
+ @media (prefers-reduced-motion: reduce) {
+ *:not([aria-busy="true"]),
+ :not([aria-busy="true"])::before,
+ :not([aria-busy="true"])::after {
+ background-attachment: initial !important; // 2
+ animation-duration: 1ms !important; // 1
+ animation-delay: -1ms !important; // 1
+ animation-iteration-count: 1 !important; // 1
+ scroll-behavior: auto !important; // 3
+ transition-delay: 0s !important; // 4
+ transition-duration: 0s !important; // 4
+ }
+ }
+}