Skip to content

Commit 7a4830d

Browse files
authored
Merge pull request #2999 from appwrite/fix/docs-reference-anchor-scroll-offset
fix(docs): clear sticky article header on reference anchor jumps
2 parents 6bac5dc + 43c596c commit 7a4830d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • src/routes/docs/references/[version]/[platform]/[service]

src/routes/docs/references/[version]/[platform]/[service]/+page.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,4 +430,11 @@
430430
margin-bottom: 0;
431431
}
432432
}
433+
/* :global is required because Heading is a child component; scope the rule to this
434+
route via .web-article-content-grid-6-4 (used only by the reference page) so it
435+
does not leak into Section.svelte / DocsTutorial.svelte. The sticky article
436+
header sits at --p-grid-huge-navs-secondary-sticky-position (~189px). */
437+
:global(.web-article-content-grid-6-4 .web-article-content-header :is(h2, h3, h4, h5, h6)) {
438+
scroll-margin-top: calc(var(--p-grid-huge-navs-secondary-sticky-position) + 1.5rem);
439+
}
433440
</style>

0 commit comments

Comments
 (0)