Preventing a grid blowout ↦
Chris Coyier on CSS-Tricks:
Say you have a very simple CSS grid layout with one column fixed at
300pxand another taking up the rest of the space at1fr.…
That’s somewhat robust. That
1frcolumn will take up any remaining space left behind by the fixed300pxcolumn. It’s true that theautovalue would do the same, butautoisn’t quite as robust since it’s size is based on the content inside.
Chris explains something here which may look pretty simple, but would’ve taken me hours to debug. The distinction he makes between the 1fr and auto defined column is game changing on its own.
Discussion
Sign in or Join to comment or subscribe