---
id: "fit-content"
kind: "web-feature"
canonical: "https://timetostable.com/feature/fit-content"
baseline: "high"
bcd_version: "8.1.11"
web_features_version: "3.48.0"
---

# fit-content (`fit-content`)

The fit-content CSS keyword expands a box as needed to fit its contents until the maximum size is reached, preserving the content's preferred aspect ratio.

- **Group**: Layout
- **Baseline**: Widely Available
- **Newly Available Date**: 2021-11-02
- **Widely Available Date**: 2024-05-02
- **Specification**: https://drafts.csswg.org/css-sizing-4/#valdef-width-fit-content
- **Constituent BCD keys**: 6

## Browser Support Timeline

| Browser | Version | Release Date |
| --- | --- | --- |
| Chrome | 46 | 2015-10-13 |
| Chrome Android | 46 | 2015-10-14 |
| Safari | 11 | 2017-09-19 |
| Safari on iOS | 11 | 2017-09-19 |
| Edge | 79 | 2020-01-15 |
| Firefox | 94 | 2021-11-02 |
| Firefox for Android | 94 | 2021-11-02 |

