support reduced motion

This commit is contained in:
a 2022-12-24 04:30:05 -06:00
parent 555d2c4fc1
commit ec503b12b9
2 changed files with 19 additions and 1 deletions

View file

@ -4,7 +4,6 @@
html {
font-family: sans-serif;
scroll-behavior: smooth;
background: var(--ui-background);
color: var(--ui-text);
}

View file

@ -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;
}
}