Performance: Blur and brightness filters
These CSS filters affect the paint and composite stages, impacting rendering speed and visual stability.
Jump into concepts and practice - no test required
<div class="filter brightness-110">Content</div><div class="filter blur-lg brightness-150">Content</div>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Using heavy blur filter | No extra DOM nodes | 0 | High paint and composite cost | [X] Bad |
| Using brightness filter only | No extra DOM nodes | 0 | Moderate paint cost | [!] OK |
| No filter applied | No extra DOM nodes | 0 | Minimal paint cost | [OK] Good |
blur-sm do to an element?blur-sm classblur-sm class applies a small blur filter, making the element look fuzzy.brightness- followed by a number like 125 for 125% brightness.brightness-125 matches Tailwind's correct syntax; others are invalid.<div class="blur-md brightness-75">Hello</div>
blur-md applies a medium blur, making the text fuzzy.brightness-75 reduces brightness to 75%, making the text darker.<img class="blur-4xl brightness-150" src="photo.jpg" alt="Photo" />
blur-4xl does not exist in Tailwind. -> Option A<button class="?">Click Me</button>
blur-lg brightness-75.blur-none) and brightness increases to 125% (brightness-125), making it clearer and brighter.transition enables smooth change on hover.