Preventing a Grid Blowout
Say you have a very simple CSS grid layout with one column fixed at 300px
and another taking up the rest of the space at 1fr
.
.grid {
display: grid;
grid-template-columns: 1fr 300px;
}
That’s somewhat robust. That 1fr
column will take up any remaining space left behind by the fixed 300px
column. It’s true that the auto
value would do the same, but auto
isn’t quite as robust since it’s size is based on the content inside. So, …
The post Preventing a Grid Blowout appeared first on CSS-Tricks.