diff options
author | 2021-05-14 21:41:00 +0800 | |
---|---|---|
committer | 2021-05-14 21:41:00 +0800 | |
commit | 0c4e00105b950ea249a28263373a6377f91ed2a1 (patch) | |
tree | 0b5ef02c0f509e40b5f32fa7780b77574c7d6065 | |
parent | Add redirect to notion privacy location. (diff) |
Enable smooth scrolling on the website.
This makes it less jarring when scrolling to a heading since many
content pages include a Table of Contents.
-rw-r--r-- | pydis_site/static/css/base/base.css | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pydis_site/static/css/base/base.css b/pydis_site/static/css/base/base.css index d3602d35..f3fe1e44 100644 --- a/pydis_site/static/css/base/base.css +++ b/pydis_site/static/css/base/base.css @@ -1,5 +1,6 @@ html { overflow: auto; + scroll-behavior: smooth; } body.site { @@ -151,3 +152,10 @@ button.is-size-navbar-menu, a.is-size-navbar-menu { height: 100%; position: absolute; } + +/* Tone down animations to avoid motion triggers */ +@media (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } +} |