Performance: Grid rows and columns
MEDIUM IMPACT
This affects how the browser calculates layout and paints the grid structure, impacting page load and rendering speed.
display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, auto);
display: grid; grid-template-columns: repeat(50, 1fr); grid-template-rows: repeat(50, 1fr);
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Large grid (50x50) | High (many grid cells) | High (many layout recalculations) | High (many paint areas) | [X] Bad |
| Moderate grid (5x5) | Low (fewer grid cells) | Low (simpler layout) | Low (fewer paint areas) | [OK] Good |