contain-intrinsic-size
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.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 83 | 83 | 107 | 17 | 83 | 17 | |
| Other | ||||||
| The contain-intrinsic-block-size CSS logical property defines the block 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-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 |
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 shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.