CSS contain-intrinsic-width Property
Description
The contain-intrinsic-width
CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment.
- 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.containIntrinsicWidth
Syntax
contain-intrinsic-width: 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
#contained_element {
border: 2px solid green;
width: 151px;
content-visibility: auto;
contain-intrinsic-width: 152px;
contain-intrinsic-height: 52px;
}
.child_element {
border: 1px solid red;
background: blue;
height: 50px;
width: 150px;
}
Browser Support
The following table will show you the current browser support for the CSS contain-intrinsic-width
property.
Desktop | |||||
95 | 95 | 107 | 81 | 17 |
Tablets / Mobile | |||||
95 | 107 | 67 | 17 | 17 | 95 |
Last updated by CSSPortal on: 31st December 2023