CSS contain-intrinsic-height Property
Description
The contain-intrinsic-height property provides an element-level intrinsic block-size (height) that the browser can use when the element’s own contents are not available to the sizing algorithms. In layouts where containment prevents the element from contributing intrinsic size information to ancestors or to percentage/auto sizing calculations, this property supplies a fallback height that the UA can treat as the element’s intrinsic block-size for the purposes of layout resolution. It is therefore a way to communicate an expected block-size to the layout system without exposing or measuring the actual inner content.
This intrinsic height influences how the element participates in several parts of the sizing process: it is consulted when the layout engine must determine a height but cannot derive one from content because of containment, and it can be used when resolving percentage-based block sizes on descendants or when establishing baseline positions in some formatting contexts. Because it is an intrinsic hint rather than an override, explicit dimension constraints or other layout rules still take precedence; the value supplied here only steps in where the content-based intrinsic information would otherwise be missing. For a shorthand that can set intrinsic sizes on both axes together, see contain-intrinsic-size.
This property is most useful in conjunction with explicit containment: when an element uses the containment mechanisms declared via contain, its internal content is isolated from ancestor sizing calculations and so providing an intrinsic height can prevent collapses and unexpected layout shifts. It also interacts with explicit sizing constraints such as height and min-height: those properties still determine final used sizes when present, while the intrinsic height influences situations where sizes would otherwise be unresolved. In practice, it’s commonly used to reduce layout instability (for example during progressive content loading) and to make containment-friendly components behave predictably in the broader page flow.
Definition
- Initial value
- none
- Applies to
- elements for which size containment can apply
- Inherited
- no
- Computed value
- as specified, with lengths values computed
- Animatable
- by computed value type
- JavaScript syntax
- object.style.containIntrinsicHeight
Syntax
contain-intrinsic-height: auto? [ none | <length> ]
Values
- auto? [ none | <length> ]If auto is specified and the element has a last remembered size and is currently skipping its contents, its explicit intrinsic inner size in the corresponding axis is the last remembered size in that axis. Otherwise, the corresponding axis either doesn’t have an explicit intrinsic inner size (if none is specified) or has an explicit intrinsic inner size of the specified <length>.
Example
Browser Support
The following information will show you the current browser support for the CSS contain-intrinsic-height property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
