From c3eebff94d8c8f3467403f1d8c664e983d4e4787 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:49:53 +0800 Subject: [PATCH] Set maximum height of sticky sidebars --- src/_includes/global/shrineinfo.njk | 3 ++- src/_includes/global/toc.njk | 2 +- src/assets/css/global.css | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/_includes/global/shrineinfo.njk b/src/_includes/global/shrineinfo.njk index c8ccacae..6991f2f0 100644 --- a/src/_includes/global/shrineinfo.njk +++ b/src/_includes/global/shrineinfo.njk @@ -21,7 +21,8 @@ .shrine__info { padding: 1rem; - overflow: auto; + max-height: var(--ht-sticky-sidebar); + overflow-x: auto; } .shrine__info h2 { diff --git a/src/_includes/global/toc.njk b/src/_includes/global/toc.njk index 3328b554..1196b02b 100644 --- a/src/_includes/global/toc.njk +++ b/src/_includes/global/toc.njk @@ -11,7 +11,7 @@ {%- css %} .toc__wrapper { - max-height: 89vh; + max-height: var(--ht-sticky-sidebar); overflow-x: auto; background-color: var(--clr-content-bg); padding: 1rem 1.3rem; diff --git a/src/assets/css/global.css b/src/assets/css/global.css index 18dcff69..0b64d520 100644 --- a/src/assets/css/global.css +++ b/src/assets/css/global.css @@ -48,6 +48,8 @@ --sz-navbar-ht: 4rem; --sz-external-link: 1.25em; --sz-content-list-gap: 0.7em; + + --ht-sticky-sidebar: 89vh; } /* ------------------- */