- 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: 1000pxwhere 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 sometimes write about tech thoughts, interesting things I've read, and project updates.