From 06136becdd6c843c97d7f9fcda796575daceba01 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Sat, 27 May 2023 02:56:14 -0700 Subject: [PATCH] doc: add `auto` intrinsic height to prevent jitter/flicker This commit addresses a scrolling/flickering issue in the HTML version of the docs. By adding `auto` to the `contain-intrinsic-size` CSS property, we're asking the browser to remember the last-rendered size for the element (once it's been rendered) instead of forcing the browser to treat it as being 1px by 5000px when it goes offscreen. PR-URL: https://github.com/nodejs/node/pull/48195 Reviewed-By: Antoine du Hamel Reviewed-By: Yagiz Nizipli --- doc/api_assets/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index 6b27fa1fb71..15e7b73f770 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -436,7 +436,7 @@ dd + dt.pre { #apicontent section { content-visibility: auto; - contain-intrinsic-size: 1px 5000px; + contain-intrinsic-size: 1px auto 5000px; } #apicontent .line {