Performance: Mix blend modes
MEDIUM IMPACT
Mix blend modes affect the paint and composite stages of rendering, impacting how layers combine visually.
<div class="relative"> <img src="image1.jpg" alt="Background" class="w-full"> <div aria-hidden="true" class="absolute top-0 left-0 w-full h-full bg-black bg-opacity-30 pointer-events-none"></div> </div>
<div class="relative"> <img src="image1.jpg" alt="Background" class="w-full"> <img src="image2.png" alt="Overlay" class="absolute top-0 left-0 mix-blend-multiply w-full"> </div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Large overlay with mix-blend-multiply | Minimal | 0 | High (full overlapping area repaint) | [X] Bad |
| Semi-transparent overlay div | Minimal | 0 | Low (simple opacity paint) | [OK] Good |