stretchLimited availability
The stretch CSS keyword expands a box as needed to fit its contents until the maximum size is reached, without preserving the content's preferred aspect ratio.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–137Not supported
138+Supportedsince Jun 24, 2025
Current: 155Edge
12–137Not supported
138+Supportedsince Jun 26, 2025
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27MobileChrome Android
18–137Not supported
138+Supportedsince Jun 24, 2025
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27How to use
Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
CSS · check before using
@supports (height: stretch) {
/* styles that rely on height: stretch */
}
/* or in JavaScript */
if (CSS.supports("height", "stretch")) {
// use it
}Specification
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| height.stretch | 138 | 138 | ✕ | 27 | 138 | ✕ | 27 |
| max-height.stretch | 138 | 138 | ✕ | 27 | 138 | ✕ | 27 |
| max-width.stretch | 138 | 138 | ✕ | 27 | 138 | ✕ | 27 |
| min-height.stretch | 138 | 138 | ✕ | 27 | 138 | ✕ | 27 |
| min-width.stretch | 138 | 138 | ✕ | 27 | 138 | ✕ | 27 |
| width.stretch | 138 | 138 | ✕ | 27 | 138 | ✕ | 27 |