content-visibility: auto
Written
- https://web.dev/content-visibility/
- This is a CSS attribute that tells to browser to forego full rendering of offscreen elements. Useful for things like big lists.
- The attribute only takes effect if the entire element is offscreen, so in a list it should be applied to each item in the list instead of the container.
- Use with
contain-intrinsic-size: 1000px
where the height there is the expected size of the element.
Thanks for reading! If you have any questions or comments, please send me a note on Twitter. And if you enjoyed this, I also have a newsletter where I send out interesting things I read and the occasional nature photo.