So.. what's this? Content Visibility affect performance, and transition behavior makes elements to be.. transition able..
Watching this video: https://www.youtube.com/watch?v=Vzj3jSUbMtI (It's Kevin Powel again).
content-visibility
changes the element visibility, and it affects the rendering loop...
So I guess it's important.
But in doing that, Since this is a discreet value, it may not work.
So, we add transition-behavior: allow-discrete;
. Also, we need to add interpolate-size: allow-keywords;
. I prefer to set interpolate-size
on the root.
Checkout the MDN for Content Visibility: https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility
For transition behavior: https://developer.mozilla.org/en-US/docs/Web/CSS/transition-behavior
For interpolate size: https://developer.mozilla.org/en-US/docs/Web/CSS/interpolate-size
Check it out on codepen: https://codepen.io/juji-the-looper/pen/PwYNYVB