From 2ba08d6cb895f145caa2353ec9cc117f35ad9998 Mon Sep 17 00:00:00 2001 From: gaoliang Date: Sat, 22 Jan 2022 02:36:08 +0800 Subject: [PATCH] Make TOC sticky --- assets/scss/_custom.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss index 71f61c6ada..0d8a98eb42 100644 --- a/assets/scss/_custom.scss +++ b/assets/scss/_custom.scss @@ -305,6 +305,12 @@ footer { padding-top: 1.5rem !important; top: 5rem !important; + @supports (position: sticky) { + position: sticky !important; + height: calc(100vh - 10rem); + overflow-y: auto; + } + #TableOfContents { padding-top: 1rem; }