← Back to release summary

CSS text-overflow: <string> value

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Adds a <string> value to the text-overflow property. This allows web authors to specify a custom string (e.g., "(more)") to indicate that text has been clipped. This provides more design flexibility and can be used to create more user-friendly and context-aware overflow indicators.

Motivation

Chromium's text-overflow implementation only supports the clip and ellipsis keywords, so authors who want a different truncation indicator must truncate the text themselves in JavaScript or overlay a positioned pseudo-element on the end of the line. Supporting the specified <string> value lets the browser truncate the text and render the author's chosen indicator together.

Standards & signals

Explainers: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-overflow#string

View on chromestatus.com