Limited Availability
Layout
id: fit-content-function
fit-content()
The
fit-content() CSS function, used outside of a grid layout property, clamps a length between min-content and max-content.
Baseline Status:
This feature is currently Limited and is missing in at least one major browser engine.
Desktop Browser Engine Support
Google Chrome
—
Unsupported
Mozilla Firefox
—
Unsupported
Apple Safari
—
Unsupported
Microsoft Edge
—
Unsupported
Mobile Browser Engine Support
Chrome Android
—
Firefox Android
—
Safari iOS
—
Specifications and References
MDN Browser Compat Data Keys:
css.properties.block-size.fit-content_function ↗
css.properties.height.fit-content_function ↗
css.properties.inline-size.fit-content_function ↗
css.properties.max-block-size.fit-content_function ↗
css.properties.max-height.fit-content_function ↗
css.properties.max-inline-size.fit-content_function ↗
css.properties.max-width.fit-content_function ↗
css.properties.min-block-size.fit-content_function ↗
css.properties.min-height.fit-content_function ↗
css.properties.min-inline-size.fit-content_function ↗
css.properties.min-width.fit-content_function ↗
css.properties.width.fit-content_function ↗