Layout containment
Widely available since 2024-09-14
The contain: layout
CSS declaration isolates the inside of an element such that it cannot affect the layout of the rest of the page or be affected by the rest of the page. This permits the browser to avoid slower layout calculations.
Learning resources on MDN
Browser support
- Chrome 52 Released on 2016-07-20
- Chrome Android 52 Released on 2016-07-27
- Edge 79 Released on 2020-01-15
- Firefox 69 Released on 2019-09-03
- Firefox for Android 79 Released on 2020-07-28
- Safari 15.4 Released on 2022-03-14
- Safari on iOS 15.4 Released on 2022-03-14