Performance: Background position
MEDIUM IMPACT
Background position affects how the browser paints background images, impacting paint and composite stages.
background-position: center center;background-position: calc(50% + 10px) calc(50% + 10px);
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| background-position: calc(50% + 10px) calc(50% + 10px); | none | 0 but triggers style recalculation | high paint cost on resize | [X] Bad |
| background-position: center center; | none | 0 | low paint cost | [OK] Good |