A responsive image gallery with support for mixed-height images using CSS Grid.
| Viewport | Columns | Row Height |
|---|---|---|
| Desktop (900px+) | 4 columns | 200px |
| Tablet (601–900px) | 3 columns | 200px |
| Mobile (≤600px) | 2 columns | 160px |
The grid uses grid-auto-rows for uniform row heights. To avoid empty gaps:
Add the class gallery-chronicle__item--tall to make any image span 2 rows vertically.
Default: The 2nd image has this class applied.
Tip: Position tall images early in the grid (items 1-3) for best results across breakpoints.
| Images | Tall Items | Result |
|---|---|---|
| 7 | 1 (item 2) | Perfect 4-col grid, 2 rows |
| 8 | 0 | Perfect 4-col grid, 2 rows |
| 11 | 1 (item 2) | Perfect 4-col grid, 3 rows |
When modifying the gallery:
.gallery-chronicle__item elements