Text fitting has moved into CSS.
Chrome 150 introduced native text-fit. The broader solution is still a layered system: intrinsic layout, wrapping, container adaptation, bounded fitting, and deterministic DOM validation.
The browser now owns one part of the problem.
text-fit removes a major class of headline-sizing scripts. It does not replace component layout, content-aware fallback states, or post-render validation.
Chrome 150
text-fit scales text nodes to fit the inline width of the containing box. Use it as a progressive enhancement.
Safari / WebKit
The standards-position issue remains open. No production implementation should be assumed.
Firefox
Continue to use the CSS-first baseline and a bounded JavaScript fallback where exact fitting is a requirement.
Separate fitting, wrapping, alignment, and truncation.
These features solve different problems. Treating them as interchangeable produces fragile components.
Scroll horizontally to compare all browser columns.
| Feature | Chromium | Safari | Firefox | Use |
|---|---|---|---|---|
text-fit | Chrome 150 | No | No | Progressive enhancement |
text-wrap: balance | Supported | Supported | Supported | Production headings |
text-wrap: pretty | Supported | Safari 26 | No | Long-form enhancement |
text-box-trim | Chrome 133 | Safari 18.2 | Preview only | Vertical alignment |
text-autospace | Supported | Supported | Supported | Mixed CJK / Latin spacing |
Unprefixed line-clamp | Experimental | Preview | No | Avoid as a dependency |
Test native fitting and the fallback in your browser.
The demo feature-detects text-fit. Disable native mode to inspect the bounded binary-search shim.
Feature-detect the capability, not the browser.
User-agent assumptions decay. The current browser can report which declarations it parses.
A positive CSS.supports() result confirms that the declaration is recognized. Layout tests must still verify line height, inline children, zoom, localization, and dynamic content.
Do not shrink before the layout has earned it.
The system should preserve content and user-selected text size before optimizing visual density.
- Correct intrinsic sizingUse
min-inline-size: 0andminmax(0, 1fr). - Improve wrappingBalance headings, allow token breaks, and declare language.
- Adapt the componentStack regions and reduce nonessential spacing through container queries.
- Apply bounded fittingUse native
text-fitor the fallback only on opted-in display text. - Truncate by policyInformation loss must be intentional, accessible, and recoverable.
A repeatable contract for ChatGPT-authored pages.
Reliability comes from generating against machine-testable constraints rather than relying on visual intuition alone.
Component boundaries
Declare container contexts and stable data-layout-id attributes.
Explicit fit policy
Mark only approved titles or labels with data-text-fit="allowed".
Accessible minimums
Set a minimum scale or minimum font size. Never shrink without a lower bound.
Long-content fixtures
Test URLs, UUIDs, translated strings, CJK, RTL, and unexpectedly large numeric values.
Viewport matrix
Validate mobile portrait, mobile landscape, tablet, desktop, zoom, and browser text scaling.
Structured report
Expose findings through a global report object and visible preview diagnostics.
Research sources and claim boundaries.
Browser status changes quickly. This page records its generated date and uses feature detection for the current runtime.
· America/Bogota
Primary browser release notes, standards-position issues, specifications, and MDN compatibility references.
Layout check pending.
- Chrome 150 overview
Official announcement of native CSS
text-fit. - Chrome 150 release notes
Implementation and specification references.
- CSS fit-text explainer
Syntax, modes, constraints, and design goals.
- WebKit standards position
Open review for the
text-fitproposal. - MDN: text-wrap
Cross-browser wrapping behavior and compatibility.
- MDN: text-box-trim
Vertical metric trimming and current limited availability.
- Safari 26 WebKit features
Official release details for
text-wrap: pretty. - CSS Text Module Level 4
Current standards framework for text processing and wrapping.