Performance: Hidden and visibility control
MEDIUM IMPACT
Controls how elements appear or disappear on the page, affecting rendering and layout stability.
<div class="invisible">Content</div><div class="hidden">Content</div>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| hidden (display:none) | Element removed from layout | Triggers 1 reflow | Paint cost reduced (not painted) | [X] Bad |
| invisible (visibility:hidden) | Element remains in layout | No reflow | Paint cost for invisible element | [OK] Good |