contain-intrinsic-size
The contain-intrinsic-size CSS property sets the intrinsic size of an element. When using size containment, the browser will lay out the element as if it had a single child of this size.
Overview
The contain-intrinsic-size CSS property sets the intrinsic size of an element. When using size containment, the browser will lay out the element as if it had a single child of this size.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 95 | 95 | 107 | 17 | 95 | 17 | |
none | 98 | 98 | 107 | 17 | 98 | 17 |
| Other | ||||||
| The contain-intrinsic-height CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. | 95 | 95 | 107 | 17 | 95 | 17 |
| CSS property | ||||||
none | 98 | 98 | 107 | 17 | 98 | 17 |
| Other | ||||||
| The contain-intrinsic-inline-size CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. | 95 | 95 | 107 | 17 | 95 | 17 |
| CSS property | ||||||
none | 98 | 98 | 107 | 17 | 98 | 17 |
| Other | ||||||
| The contain-intrinsic-size CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. | 83 | 83 | 107 | 17 | 83 | 17 |
| CSS property | ||||||
auto none `auto none` value | 117 | 117 | 117 | 17 | 117 | 17 |
none | 98 | 98 | 107 | 17 | 98 | 17 |
| Other | ||||||
| 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. | 95 | 95 | 107 | 17 | 95 | 17 |
| CSS property | ||||||
none | 98 | 98 | 107 | 17 | 98 | 17 |
Syntax
.lazy-section {
content-visibility: auto;
contain-intrinsic-size: auto 500px;
} Live demo
Use cases
Using contain-intrinsic-size
The contain-intrinsic-size CSS property sets the intrinsic size of an element. When using size containment, the browser will lay out the element as if it had a single child of this size.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.
Related links
Powered by web-features