diff --git a/src/client/theme-default/components/VPSidebar.vue b/src/client/theme-default/components/VPSidebar.vue index f39a7d99..ffa3047c 100644 --- a/src/client/theme-default/components/VPSidebar.vue +++ b/src/client/theme-default/components/VPSidebar.vue @@ -83,7 +83,6 @@ watchPostEffect(async () => { padding-bottom: 128px; width: var(--vp-sidebar-width); max-width: 100%; - width: var(--vp-sidebar-width); background-color: var(--vp-c-bg-alt); opacity: 1; visibility: visible; diff --git a/src/client/theme-default/composables/outline.ts b/src/client/theme-default/composables/outline.ts index 4b891f39..e4794f60 100644 --- a/src/client/theme-default/composables/outline.ts +++ b/src/client/theme-default/composables/outline.ts @@ -105,7 +105,7 @@ export function useActiveAnchor( const scrollY = window.scrollY const innerHeight = window.innerHeight const offsetHeight = document.body.offsetHeight - const isBottom = scrollY + innerHeight === offsetHeight + const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1 // page bottom - highlight last one if (anchors.length && isBottom) {