Web features explorer

Paint containment

Widely available since 2024-09-14
Tags: css Groups: CSS > Containment

The contain: paint CSS declaration prevents an element's descendants from being drawn outside the boundaries of the containing element, with any overflow clipped. This permits the browser to avoid slower painting calculations.

Learning resources on MDN

Browser support