Why does minmax(0, 1fr) work for long elements while 1fr doesn't?
Because 1fr
is equivalent to minmax(auto, 1fr)
, by default.
When you use minmax(0, 1fr)
, that's something different than standalone 1fr
.
In the first case, the track cannot be smaller than the size of the grid item (min size is auto
).
In the second case, the track is free to resize to a 0 width/height.
More details:
- Reconsider the meaning of
1fr
- Prevent grid area from expanding causing whole page to scroll