i am trying to decide between using
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
and the auto-fill version for a product gallery. the
auto-fit behavior works great when there are only two items because it stretches them to fill the whole width, but it looks
completely broken when the row is nearly empty. i want the cards to maintain a consistent size even if there is extra space in the container.
>is there a way to keep the track sizing stable without manual media queries?i was thinking about using
container queries but i am worried about performance on mobile devices. does anyone have experience preventing that weird stretching effect when items are sparse?