diff --git a/src/main.ts b/src/main.ts index c405cb7..107971e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -49,10 +49,7 @@ export function generateToc() { "group flex items-center justify-between rounded py-1 px-1.5 transition-all hover:bg-gray-100 text-sm opacity-80 dark:hover:bg-slate-700 dark:text-slate-50", collapseDepth: 6, headingsOffset: 100, - scrollSmooth: true, - scrollSmoothOffset: -100, - // @ts-ignore - tocScrollOffset: 50, + scrollSmooth: false, }); } diff --git a/src/styles/main.scss b/src/styles/main.scss index 70b81d0..914256d 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -2,6 +2,11 @@ body { overflow: overlay; } +html { + scroll-padding-top: 100px; + scroll-behavior: smooth; +} + *::-webkit-scrollbar-track-piece { background-color: #f8f8f8; -webkit-border-radius: 2em;