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 <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
Daniel Holbert authored and GitHub committed 2023-05-27 09:56:14 +00:00
1 parent be469d85da
commit 06136becdd
1 file changed
+1 -1
+1 -1
View File
@@ -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 {