From d3460dc84352859a982324385a6cbe707ac9e7ec Mon Sep 17 00:00:00 2001 From: Thomas Deinhamer Date: Sun, 8 Feb 2026 13:49:03 +0100 Subject: [PATCH] fix: streamline anchor scrolling --- app/assets/main.css | 2 +- app/components/CollapsibleSection.vue | 17 +--- app/components/Link/Base.vue | 4 +- app/components/PackageProvenanceSection.vue | 11 +-- app/components/Readme.vue | 9 +- app/components/ReadmeTocDropdown.vue | 28 +++--- app/composables/useActiveTocItem.ts | 90 +------------------- app/pages/package/[[org]]/[name].vue | 3 +- app/utils/scrollToAnchor.ts | 45 ---------- nuxt.config.ts | 6 ++ test/nuxt/components/PackageVersions.spec.ts | 4 +- 11 files changed, 43 insertions(+), 176 deletions(-) delete mode 100644 app/utils/scrollToAnchor.ts diff --git a/app/assets/main.css b/app/assets/main.css index 0e46a37b8..dbf096b22 100644 --- a/app/assets/main.css +++ b/app/assets/main.css @@ -192,11 +192,11 @@ */ html { + @apply scroll-pt-20; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; /* Offset for fixed header - otherwise anchor headers are cutted */ - scroll-padding-top: 5rem; scrollbar-gutter: stable; } diff --git a/app/components/CollapsibleSection.vue b/app/components/CollapsibleSection.vue index bf48c9eb0..7727202c2 100644 --- a/app/components/CollapsibleSection.vue +++ b/app/components/CollapsibleSection.vue @@ -1,5 +1,6 @@