From e8d5c87a6615ba40765d37a64d577ce0f85e8d7d Mon Sep 17 00:00:00 2001 From: cloydlau <253055734@qq.com> Date: Sun, 23 Oct 2022 13:47:38 +0800 Subject: [PATCH] doc: avoid hiding by navigation bar in anchor jumping --- 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;