Performance: Why custom grids offer control
MEDIUM IMPACT
Custom grids affect page layout speed and visual stability by controlling how elements are sized and placed.
$grid-template-columns: 100px 200px 1fr; .container { display: grid; grid-template-columns: #{$grid-template-columns}; }
$grid-template: repeat(auto-fit, minmax(100px, 1fr)); .container { display: grid; grid-template-columns: #{$grid-template}; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Auto-fit with minmax() | Low | Multiple on resize | Medium | [X] Bad |
| Explicit fixed grid tracks | Low | Single on load | Low | [OK] Good |