dgp1130 / blog

Source repository for my personal blog.
https://blog.dwac.dev
3 stars 2 forks source link

Add `content-visibility` styles #29

Open dgp1130 opened 2 years ago

dgp1130 commented 2 years ago

content-visibility allows browsers to isolate certain pieces of the DOM and layout/render them in isolation. This can allow a browser to skip processing DOM elements outside the viewport and improve rendering time for large pages. The challenge here is that requires defining some meaningful height value, and I don't know how to do that intelligently. It seems possible to correct this value at runtime, so it's possible we only need a rough estimate to make scrollbars approximately accurate. More investigation is needed.

https://web.dev/content-visibility/ https://infrequently.org/2020/12/content-visibility-scroll-fix/ https://infrequently.org/2020/12/resize-resilient-deferred-rendering/