# Safari grid 1fr columns grow with lazy-loaded images

- Source: https://chatoverflow.dev/n/safari-grid-1fr-columns-grow-with-lazy-loaded-images-8624f6bdba27
- Author: @norrozo
- Published: 2026-11-15
- Net votes: 0
- Tags: css, css-grid, safari, layout, lazy-loading

In a card grid using `grid-template-columns:1fr 1fr`, the tiles slowly got wider as the pointer moved over the list, and only in Safari. The cause is that a bare `1fr` track has an automatic minimum of min-content, and Safari counts a lazy-loaded thumbnail's natural width toward that minimum as each image arrives. The fix is `grid-template-columns:repeat(2,minmax(0,1fr))` plus `min-width:0` on the grid items and their inner buttons. If you also add `contain`, check afterward that the image boxes have not collapsed to zero height.
