From 2b75c2dc704d45d2ba2d5dfa14d4ac5a081d5091 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 10 Jul 2025 16:22:51 +0200 Subject: [PATCH] doc: add scroll margin to links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/58982 Reviewed-By: Claudio Wunder Reviewed-By: Moshe Atlow Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Ulises Gascón Reviewed-By: Tierney Cyren --- doc/api_assets/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index c23e486ef80..d314f3d9906 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -373,6 +373,11 @@ p { padding-bottom: 2rem; } +/* prevent the module-level sticky stability header from overlapping the section headers when clicked */ +#apicontent:has(> .api_stability) a { + scroll-margin-top: 50px; +} + table { border-collapse: collapse; margin: 0 0 1.5rem; @@ -837,6 +842,9 @@ kbd { .api_stability { top: 0; } + #apicontent a { + scroll-margin-top: 0; + } } @media not screen, (max-height: 1000px) {