From 8364061dbd6b9d52c50a06d7db63a0a8ab52a5a3 Mon Sep 17 00:00:00 2001 From: kseniyakuzina Date: Mon, 16 Dec 2024 15:19:45 +0300 Subject: [PATCH] feat(styles): disable animations if needed --- styles/styles.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/styles/styles.scss b/styles/styles.scss index 7783e114d..606042482 100644 --- a/styles/styles.scss +++ b/styles/styles.scss @@ -73,3 +73,18 @@ :root:has(body.g-root_theme_dark-hc) { color-scheme: dark; } + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + /* stylelint-disable-next-line declaration-no-important */ + scroll-behavior: auto !important; + /* stylelint-disable-next-line declaration-no-important */ + transition-duration: 0.001ms !important; + /* stylelint-disable-next-line declaration-no-important */ + animation-duration: 0.001ms !important; + /* stylelint-disable-next-line declaration-no-important */ + animation-iteration-count: 1 !important; + } +}