Skip to content

Commit

Permalink
doc: add auto intrinsic height to prevent jitter/flicker
Browse files Browse the repository at this point in the history
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: #48195
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
  • Loading branch information
dholbert authored and MoLow committed Jul 6, 2023
1 parent 5445835 commit fe15dae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api_assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fe15dae

Please sign in to comment.