fix(web): keep docs anchor scroll-margin overrideable (#1282)

Closes #1278. The docs page sets per-section `scroll-mt-32` (8rem) on each anchor section to clear the sticky nav, but the global `[id] { scroll-margin-top: 5rem }` rule loaded later with the same specificity, so 5rem won. Wrapping the global rule in `:where(...)` drops its specificity to 0, letting the page-level Tailwind utility win while still providing a fallback for anchors elsewhere on the site.

Thanks @Wenjunyun123.
This commit is contained in:
Hunter Bown
2026-05-09 08:53:33 -05:00
committed by GitHub
+2 -2
View File
@@ -339,5 +339,5 @@ a.body-link:hover { background-size: 100% 6px; color: var(--ink); }
.ticker-track { gap: 1.5rem; padding-right: 1.5rem; }
}
/* Anchor scroll-margin so deep links land below the sticky nav. */
[id] { scroll-margin-top: 5rem; }
/* Anchor fallback; page-level scroll-mt utilities should be able to override it. */
:where([id]) { scroll-margin-top: 5rem; }