Improving rendering performance with CSS content-visibility
September 24, 2024
If you’re not familiar, content-visibility is a new-ish CSS feature that allows you to “hide” certain parts of the DOM from the perspective of layout and paint. It largely doesn’t affect the accessibility tree (since the DOM nodes are still there), it doesn’t affect find-in-page (⌘+F/Ctrl+F), and it doesn’t require virtualization. All it needs is a size estimate of off-screen elements, so that the browser can reserve space there instead.
Source: Improving rendering performance with CSS content-visibility | Read the Tea Leaves
content-visibility is a relatively well supported progressive enhancement you can use to potentially dramatically improve the performance of your web content.
We