Performance: Position utilities (relative, absolute, fixed)
MEDIUM IMPACT
This affects how elements are layered and positioned on the page, impacting layout stability and paint performance.
<div class="relative"> <div class="fixed top-0 left-0">Overlay</div> </div>
<div class="relative"> <div class="absolute top-0 left-0">Overlay</div> </div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| relative positioning | none extra | minimal reflows | low paint cost | [OK] Good |
| absolute positioning inside relative container | none extra | multiple reflows if container resizes | medium paint cost | [!] OK |
| fixed positioning | none extra | no reflows on container changes | low paint cost | [OK] Good |