[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1795925919575.jpg (107.49 KB, 1024x682, img_1795925910854_yj20yzl1.jpg)ImgOps Exif Google Yandex

18aa1 No.2557

I've been using this to fix lag on pages with massive DOM trees. It basically tells the browser not to bother rendering anything outside the viewport. You don't need a complex intersection observer setup if you just want a quick win for scroll performance. Just make sure you set a minimum height so the scrollbar doesn't jump around when things load in.

.list-item {content-visibility: auto;contain-intrinsic-size: 0 50px;}


The intrinsic size part is important because it keeps the layout stable. It works best with content-visibility on repeating components like cards or list rows.


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]