Performance: Shadow utilities
MEDIUM IMPACT
Shadow utilities affect the paint and composite stages of page rendering by adding visual depth with shadows.
<div class="shadow-sm"></div> <div class="shadow-sm"></div> <div class="shadow-sm"></div>
<div class="shadow-lg"></div> <div class="shadow-lg"></div> <div class="shadow-lg"></div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Large shadows on many elements | Low | 0 | High paint and composite cost | [X] Bad |
| Small shadows on few elements | Low | 0 | Low paint and composite cost | [OK] Good |