Skip to content
0

Text Decoration & Overflow ​

Control text decoration lines (underline, overline, line-through) and how overflowing text is handled.

Text Decoration ​

ClassProperties
.underlinetext-decoration-line: underline
.overlinetext-decoration-line: overline
.line-throughtext-decoration-line: line-through
.no-underlinetext-decoration-line: none

Basic Usage ​

html
<a class="underline">Underlined link</a>
<span class="line-through">Strikethrough text</span>
<a class="no-underline">Link without underline</a>

Text Overflow ​

ClassProperties
.truncateoverflow: hidden; text-overflow: ellipsis; white-space: nowrap
.text-ellipsistext-overflow: ellipsis
.text-cliptext-overflow: clip

Basic Usage ​

html
<!-- Truncate long text with ellipsis -->
<p class="truncate w-64">
  This is a very long text that will be truncated with an ellipsis.
</p>

<!-- Clip overflowing text -->
<p class="text-clip w-64">This text will be clipped without ellipsis.</p>

TIP

.truncate is a shorthand that combines overflow: hidden, text-overflow: ellipsis, and white-space: nowrap for single-line text truncation.

SCSS Source ​

scss
// From _utilities.scss
$text-decoration-list: (underline, overline, line-through, no-underline) !default;
$text-overflow-list: (truncate, text-ellipsis, text-clip) !default;

Released under the MIT License.