From 0f06cb82259e9e5f234a77173f2ea8936d8686b2 Mon Sep 17 00:00:00 2001 From: Johnson <20457146+j3soon@users.noreply.github.com> Date: Sat, 31 Jul 2021 03:54:49 +0800 Subject: [PATCH] Enable toc sidebar scrolling (#2874) * Enable toc sidebar scrolling * Refactor style rules * Move style rules from 'navigation' to 'sidebar' * Remove custom scrollbar styles --- _sass/minimal-mistakes/_navigation.scss | 4 ++-- _sass/minimal-mistakes/_sidebar.scss | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/_sass/minimal-mistakes/_navigation.scss b/_sass/minimal-mistakes/_navigation.scss index 4909c2d4..24d1b1b5 100644 --- a/_sass/minimal-mistakes/_navigation.scss +++ b/_sass/minimal-mistakes/_navigation.scss @@ -200,8 +200,8 @@ margin-left: 0; } } - - img{ + + img { -webkit-transition: none; transition: none; } diff --git a/_sass/minimal-mistakes/_sidebar.scss b/_sass/minimal-mistakes/_sidebar.scss index b1f5ca98..02b455b4 100644 --- a/_sass/minimal-mistakes/_sidebar.scss +++ b/_sass/minimal-mistakes/_sidebar.scss @@ -89,6 +89,13 @@ position: sticky; top: 2em; float: right; + + .toc { + .toc__menu { + overflow-y: auto; + max-height: calc(100vh - 7em); + } + } } }