Work on making text fill its container without JavaScript has produced a prototype of text-grow and text-shrink, demonstrated by Adam in Chrome Canary 145.
h1 {
text-grow: per-line scale;
}
The fuller syntax comes from Roma Komarov's explainer, which Danny covered earlier while surveying options for fitting text to a box. Both properties accept the same three arguments, with the second and third optional:
text-grow: <fit-target> <fit-method>? <length>?;
text-shrink: <fit-target> <fit-method>? <length>?;
Modes: per-line vs. consistent
The argument governs which lines get resized and how much the rest of them move with it. Under per-line, text-grow expands lines shorter than the container to fill it, while text-shrink pulls lines longer than the container back down. Under consistent, the shortest line drives the sizing for text-grow and every other line receives the same scaling factor; for text-shrink, the longest line is fitted and the remaining lines shrink by that shared factor. The argument sets a maximum font size for text-grow or a minimum for text-shrink.
How the fit is applied
As the explainer lays out, determines whether glyphs are transformed or the typography itself changes. scale and scale-inline scale the glyphs — the latter only horizontally — rather than touching font-size. font-size grows or shrinks the font size itself, and letter-spacing adjusts tracking instead.
Because these methods bypass font-size in several cases, the specification still has accessibility work to settle. The explainer asks directly how user font scaling should be handled:
If an end-user tries to enlarge font size, UAs should not fit enlarged lines to the container width. Is minimum-font setting enough?
Una Kravets raised further questions on Bluesky:
- Should the last line of a paragraph be scaled?
- Is the current line-height behavior as expected?
- Should it scale non-text parts such as inline images together?
The open discussion lives in the CSSWG GitHub issue (#2528) for anyone who wants to weigh in.
Donnie D'Amato also suggests the feature may be a better fit for print styles than for screens — a use case worth keeping in mind.



