text-fit (fit-to-width headlines)
Chrome 150 only (June 2026). Not Baseline.
Chrome 150
Edge 150
Safari no
Firefox no
Scales a heading's font size so the line exactly fills its container, the CSS answer to "fit text" JS plugins.
Fits the width
CSS
.fx-056 {
font-size: clamp(2rem,8vw,6rem);
text-fit: fit-width;
white-space: nowrap;
font-family: system-ui;
margin: 0;
max-width: 100%
}
HTML
<h1 class="fx-056">Fits the width</h1>Fallback: Keep the `clamp()` font-size as the fallback; other browsers use it.
Prompt
For poster-style headings that must span the full width, add `text-fit: fit-width` with `white-space: nowrap` on top of a `clamp()` font-size fallback. Chrome 150+ only in 2026-09; do not add a fit-text JS library.