v147 · CSS · UX
Clip Text overflow on user interaction
When a user clicks or navigates into a text element styled with text-overflow: ellipsis, Chrome now automatically switches to clip — revealing the full content for editing or selection without any JavaScript.
concepts
-
Truncated List
A task list where each item is clipped to a single line with an ellipsis. Click any item to focus it and watch the full text reveal automatically — then blur to return to truncated view.
-
Live Edit
Single-line
<input>andcontenteditableelements showing how the automatic clip-on-focus behaviour applies to both form controls and editable regions. -
Overflow Text Editor
Gallery of realistic truncated fields — file paths, URLs, commit messages, CSS selectors — with an adjustable container-width slider. Click any field to reveal and edit the full content, demonstrating the zero-JS behaviour across diverse content types.
-
Data Table
A deployment log table with truncated path/message and commit-hash columns. Click any row to expand — full content appears across all cells simultaneously. Toggle the auto-expand checkbox to compare the locked-truncated state and see the exact CSS behind it.
-
Compatibility Lab
Probes the CSS-only clip-on-focus behaviour via live DOM injection. Side-by-side: native
:focus { overflow: auto; text-overflow: clip; }versus a JavaScriptfocus/blurevent handler adding an.expandedclass. Provides the exact@supportsguard and a portable fallback function.
why it shipped
Before Chrome 148, a single-line element styled with overflow: hidden; text-overflow: ellipsis; white-space: nowrap would continue to show the ellipsis even when the user clicked into it to edit or select text. Developers had to add JavaScript focus/blur listeners to toggle the overflow property or use a hidden input trick. Chrome 148 makes the browser do this automatically: on focus (or caret navigation) into any element with text-overflow: ellipsis, the overflow is rendered as clip so the user can see and interact with the full content, then restores the ellipsis on blur.
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗