Web features explorer

Size containment

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

The contain: size CSS declaration sets an element's dimensions exclusively by its height and width properties, ignoring its contents and descendants. This permits the browser to avoid slower layout calculations.

Learning resources on MDN

Browser support