--

You have to also specify min-width: 100% and max-width: 100%. In Tailwind CSS that's min-w-full and max-w-full along with the transform-gpu class.

Now I get "0" as Cumulative Layout Shift. Woot!

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

No responses yet