From 293ce340f4516b6a42334db58924b0570f4dd4eb Mon Sep 17 00:00:00 2001 From: ShaopengLin Date: Fri, 27 Sep 2024 21:27:54 -0400 Subject: [PATCH] Proper Scroll Area Styling for TOC --- resources/css/toc.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/resources/css/toc.css b/resources/css/toc.css index 509acfe..f02a8a8 100644 --- a/resources/css/toc.css +++ b/resources/css/toc.css @@ -107,3 +107,27 @@ } .kiwix-toc-item-a:before { content: counters(item, ".") " "; counter-increment: item; margin-right: 10px; padding-left: 10px; } + +#kiwix-toc { + all: initial; + display: block; + position: relative; + + /* #kiwix-toc-title-div height&padding and #kiwix-toc border-top */ + height: calc(100vh - 51px); + + width: 100%; + overflow: auto; + border-top: 1px solid #ccc; +} + +#kiwix-toc::-webkit-scrollbar { + width: 5px; + border: 1px solid #ccc; + outline: none; +} + +#kiwix-toc::-webkit-scrollbar-thumb { + background-color: darkgrey; + outline: none; +}