From b0bd534bce3e712b54d1d43173997e4c785a572e Mon Sep 17 00:00:00 2001 From: Cloyd Lau <31238760+cloydlau@users.noreply.github.com> Date: Fri, 17 May 2024 03:24:51 +0800 Subject: [PATCH] doc: avoid hiding by navigation bar in anchor jumping PR-URL: https://github.com/nodejs/node/pull/45131 Fixes: https://github.com/nodejs/node/issues/42286 Reviewed-By: Antoine du Hamel --- doc/api_assets/style.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 073d202b3cbdd0..f817043e13a50b 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -67,9 +67,16 @@ h5 :target { } /*--------------------- Layout and Typography ----------------------------*/ +@media (prefers-reduced-motion: no-preference) { + html { + scroll-behavior: smooth; + } +} + html { font-size: 1rem; overflow-wrap: break-word; + scroll-padding-top: 50vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-font-variant-ligatures: none;