Performance: Top, right, bottom, left offsets
MEDIUM IMPACT
This concept affects layout and paint performance by changing element positioning and triggering reflows.
<div class="relative"> <div class="transform translate-x-10 translate-y-10">Box</div> </div>
<div class="relative"> <div class="absolute top-10 left-10">Box</div> </div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Using top/right/bottom/left offsets with position | Low (few nodes) | Triggers reflow on offset change | Medium (repaint affected area) | [!] OK |
| Using CSS transform translate for movement | Low | No reflows triggered | Low (composite only) | [OK] Good |