Hubert Sablonnière avatar Hubert Sablonnière

Prevent layout shifts with CSS grid stacks

Screenshot of “Prevent layout shifts with CSS grid stacks”

I keep sending people this clever solution provided by Hubert, I wonder why I still didn't add it to my links!

😎 No more layout shifts!

Compared to the absolute position solution, we improved the situation:

  • No need to add a .wrapper
  • Would work fine with more than two panels
  • No need to assume which panel needs to guide the whole component size