From 9d289ec7bc2521bb8bd7b2be9fe5adcea0e9c39d Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Wed, 27 Nov 2024 02:20:52 +0200 Subject: [PATCH] Tweak the table of contents pane --- src/public/stylesheets/theme-next.css | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/public/stylesheets/theme-next.css b/src/public/stylesheets/theme-next.css index e01142282..eba23feab 100644 --- a/src/public/stylesheets/theme-next.css +++ b/src/public/stylesheets/theme-next.css @@ -104,6 +104,8 @@ --mermaid-theme: default; + --toc-item-hover-background: #ececec; + --code-block-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.2); } @@ -190,6 +192,8 @@ --tooltip-background-color: #333; --link-color: lightskyblue; + --toc-item-hover-background: #ececec; + --mermaid-theme: dark; --code-block-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); @@ -382,6 +386,32 @@ transition: background 300ms ease-in; } +/* + * Table of contents + */ + +#right-pane .toc li { + padding: 2px 8px; + border-radius: 4px; + text-align: unset; + transition: background-color 150ms ease-in; +} + +#right-pane .toc li::marker { + color: var(--muted-text-color); +} + +#right-pane .toc li:hover { + background: var(--toc-item-hover-background); + font-weight: normal; + transition: background-color 300ms ease-out; +} + +#right-pane .toc li:active { + background: transparent; + transition: none; +} + /* * Menus */