From 0c4e00105b950ea249a28263373a6377f91ed2a1 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Fri, 14 May 2021 21:41:00 +0800 Subject: 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. --- pydis_site/static/css/base/base.css | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pydis_site/static') 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; + } +} -- cgit v1.2.3