Browser state ·

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.

Native fitting is realChromium can scale text to the inline width of its box.
Cross-browser remains layeredSafari and Firefox still need CSS fallback and optional JS fitting.
Validation is still requiredNative fitting does not detect parent escape, clipping, overlap, or accessibility regressions.
What changed

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.

Shipped

Chrome 150

text-fit scales text nodes to fit the inline width of the containing box. Use it as a progressive enhancement.

Open review

Safari / WebKit

The standards-position issue remains open. No production implementation should be assumed.

No production support

Firefox

Continue to use the CSS-first baseline and a bounded JavaScript fallback where exact fitting is a requirement.

Support matrix

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.

FeatureChromiumSafariFirefoxUse
text-fitChrome 150NoNoProgressive enhancement
text-wrap: balanceSupportedSupportedSupportedProduction headings
text-wrap: prettySupportedSafari 26NoLong-form enhancement
text-box-trimChrome 133Safari 18.2Preview onlyVertical alignment
text-autospaceSupportedSupportedSupportedMixed CJK / Latin spacing
Unprefixed line-clampExperimentalPreviewNoAvoid as a dependency
Live playground

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.

560px
64px
70%
Use native CSS
Only enabled when supported.
Checking support Mode pending
Responsive component boundary
Enterprise AI platforms need typography that survives real content.
Font sizepx
Lines
Client widthpx
Scroll widthpx
Generated CSS
Runtime evidence

Feature-detect the capability, not the browser.

User-agent assumptions decay. The current browser can report which declarations it parses.

Parsing support is not complete behavioral validation.

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.

Repair hierarchy

Do not shrink before the layout has earned it.

The system should preserve content and user-selected text size before optimizing visual density.

  1. Correct intrinsic sizingUse min-inline-size: 0 and minmax(0, 1fr).
  2. Improve wrappingBalance headings, allow token breaks, and declare language.
  3. Adapt the componentStack regions and reduce nonessential spacing through container queries.
  4. Apply bounded fittingUse native text-fit or the fallback only on opted-in display text.
  5. Truncate by policyInformation loss must be intentional, accessible, and recoverable.
Generated layout contract

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.

Provenance

Research sources and claim boundaries.

Browser status changes quickly. This page records its generated date and uses feature detection for the current runtime.

Generated

· America/Bogota

Method

Primary browser release notes, standards-position issues, specifications, and MDN compatibility references.

Runtime status

Layout check pending.