Performance: Height utilities
MEDIUM IMPACT
Height utilities affect the layout and paint phases by changing element dimensions, impacting rendering speed and visual stability.
<div class="h-[calc(100vh-50px)]"></div><div style="height: calc(100vh - 50px);"></div>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Inline style with calc() | Low | Multiple on resize | Medium | [X] Bad |
| Tailwind arbitrary height utility | Low | Single on load | Low | [!] OK |
| Tailwind predefined height utility | Low | Single on load | Low | [OK] Good |
| Inline media queries for height | Low | Multiple on resize | Medium | [X] Bad |
| Tailwind responsive height utilities | Low | Single on resize | Low | [OK] Good |