Skip to content

Instantly share code, notes, and snippets.

@brianleejackson
Last active January 24, 2023 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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