From 3da7a083c8a04758884a4940a2b2299cbba48e94 Mon Sep 17 00:00:00 2001 From: radishzzz Date: Mon, 31 Mar 2025 16:32:23 +0100 Subject: [PATCH] fix: improve toc highlighting responsiveness --- src/components/Widgets/TOC.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Widgets/TOC.astro b/src/components/Widgets/TOC.astro index c9ce93c..4f36b2b 100644 --- a/src/components/Widgets/TOC.astro +++ b/src/components/Widgets/TOC.astro @@ -201,7 +201,7 @@ function setupTOCHighlight() { // Create the intersection observer const headingObserver = new IntersectionObserver(intersectionCallback, { - rootMargin: '-5% 0% -85% 0%', + rootMargin: '0% 0% -66% 0%', threshold: [0.4], })