Web features explorer

fit-content

Widely available
Tags: css Groups: CSS > Layout

The fit-content CSS keyword expands a box as needed to fit its contents until the maximum size is reached. To learn more, see fit-content at MDN.

Compatibility