CSS contain-intrinsic-inline-size Property
Description
The contain-intrinsic-inline-size property lets an author provide a fallback intrinsic inline dimension for an element that is isolated from normal layout measurement. In other words, when an element has containment that prevents the user agent from measuring its contents for intrinsic-size calculations, this property supplies a logical inline-size the UA can treat as the element’s intrinsic width for purposes of auto-sizing and intrinsic sizing steps. Because it is a logical property, its meaning adapts to writing mode: in horizontal text it corresponds to the horizontal axis, in vertical text to the vertical axis.
This property is primarily consulted during the CSS intrinsic sizing algorithm whenever the element’s real content metrics are unavailable due to containment (for example when using contain). It is not a hard override of an explicitly specified definite size - if the element has a definite width or inline-size, those definite values take precedence - but it does act as the intrinsic min/max/auto baseline the UA uses when resolving auto and intrinsic-dependent sizing such as track sizing in grids or flex item base sizes.
Practically, contain-intrinsic-inline-size is useful for components and isolated elements (web components, shadow roots, embedded widgets) where you want predictable layout behavior without exposing internals to the parent’s layout engine. Supplying an intrinsic inline size reduces layout jitter and gives the parent layout clearer information when computing min-content, max-content, and auto sizes, and it complements other constraints such as min-width. In short, it provides an author-controlled intrinsic fallback used only when the normal content-based measurements are intentionally blocked by containment.
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.containIntrinsicInlineSize
Syntax
contain-intrinsic-inline-size: 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-inline-size 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
