# text-fit (fit-to-width headlines)

Status: Só Chrome 150 (junho de 2026). Não é Baseline.  
Fonte: https://developer.chrome.com/release-notes/150  
Página: https://designforai.dev/pt/css/text-fit

Escala o tamanho da fonte de um título para a linha preencher exatamente o container, a resposta do CSS aos plugins JS de "fit text".

## HTML

```html
<h1 class="fx-056">Fits the width</h1>
```

## CSS

```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%
}
```

Fallback: Mantenha o font-size em `clamp()` como fallback; os outros navegadores usam ele.

## Prompt

Para títulos estilo pôster que precisam ocupar a largura total, adicione `text-fit: fit-width` com `white-space: nowrap` por cima de um fallback de font-size em `clamp()`. Só Chrome 150+ em 2026-09; não adicione uma biblioteca JS de fit-text.
