diff --git a/assets/styles/common/base.scss b/assets/styles/common/base.scss index 36e5af9..a389f4b 100644 --- a/assets/styles/common/base.scss +++ b/assets/styles/common/base.scss @@ -4,7 +4,6 @@ html { font-family: sans-serif; - scroll-behavior: smooth; background: var(--ui-background); color: var(--ui-text); } diff --git a/assets/styles/common/reset.scss b/assets/styles/common/reset.scss index e66930e..cf54b83 100644 --- a/assets/styles/common/reset.scss +++ b/assets/styles/common/reset.scss @@ -40,4 +40,23 @@ blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; +} + +html:focus-within { + scroll-behavior: smooth; +} + +@media (prefers-reduced-motion: reduce) { + html:focus-within { + scroll-behavior: auto; + } + + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } } \ No newline at end of file