Skip to content

Instantly share code, notes, and snippets.

@brianleejackson
Last active September 26, 2024 03:26
Show Gist options
  • Save brianleejackson/9f51b1d2985b60d4046c7898765e04df to your computer and use it in GitHub Desktop.
Save brianleejackson/9f51b1d2985b60d4046c7898765e04df to your computer and use it in GitHub Desktop.
Add content-visibility to WordPress element (lazy render)
.nameofdiv {
content-visibility: auto;
contain-intrinsic-size: 0 1000px;
}
/* References:
https://web.dev/content-visibility/
https://segmentfault.com/a/1190000041980427/en
https://clubmate.fi/content-visibility-auto
https://dev.to/dailydevtips1/i-made-my-website-28ms-faster-with-content-visibility-466e
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment