TypographyText Overflow

Text Overflow

Controls how hidden text overflow content is displayed.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari
ClassStyle
to-ctext-overflow: clip;
to-etext-overflow: ellipsis;

Clip

Initial value

The text will be clipped at the edge of the container without any indication that it has been cut off.

Pneumonoultramicroscopicsilicovolcanoconiosis

<p class="fs-lg o-h tc-slate to-c w-35 ws-nw">Pneumonoultramicroscopicsilicovolcanoconiosis</p>

Ellipsis

The text will be truncated with an ellipsis at the end to indicate that there is more content that is not visible.

Pneumonoultramicroscopicsilicovolcanoconiosis

<p class="fs-lg o-h tc-slate to-e w-35 ws-nw">Pneumonoultramicroscopicsilicovolcanoconiosis</p>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Targeting different viewports

You can combine responsive breakpoints like sm:to-*, md:to-*, lg:to-*, and xxl:to-* to allow targeting specific utilities in different viewports.

Targeting hover states

Alternatively, you can apply :hover by using h:to-* utility to override elements and change their values when hovering over them.