TypographyText Decoration Thickness

Text Decoration Thickness

Controls the thickness of text decorations.

Widely available

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

Chrome
Edge
Firefox
Safari
ClassStyle
tdt-0text-decoration-thickness: 0px;
tdt-1text-decoration-thickness: 1px;
tdt-2text-decoration-thickness: 2px;
tdt-3text-decoration-thickness: 3px;
tdt-4text-decoration-thickness: 4px;
tdt-autotext-decoration-thickness: auto;
tdt-fftext-decoration-thickness: from-font;

Auto

Initial value

The text will have a default decoration thickness.

Sphinx of black quartz, judge my vow.

<p class="fs-lg ta-c tc-slate tdl-u tdt-auto">Sphinx of black quartz, judge my vow.</p>

0

The text will have no visible decoration thickness.

Sphinx of black quartz, judge my vow.

<p class="fs-lg ta-c tc-slate tdl-u tdt-0">Sphinx of black quartz, judge my vow.</p>

1

The text will have a thin decoration line.

Sphinx of black quartz, judge my vow.

<p class="fs-lg ta-c tc-slate tdl-u tdt-1">Sphinx of black quartz, judge my vow.</p>

2

The text will have a slightly thicker decoration line.

Sphinx of black quartz, judge my vow.

<p class="fs-lg ta-c tc-slate tdl-u tdt-2">Sphinx of black quartz, judge my vow.</p>

3

The text will have a moderately thick decoration line.

Sphinx of black quartz, judge my vow.

<p class="fs-lg ta-c tc-slate tdl-u tdt-3">Sphinx of black quartz, judge my vow.</p>

4

The text will have a thick decoration line.

Sphinx of black quartz, judge my vow.

<p class="fs-lg ta-c tc-slate tdl-u tdt-4">Sphinx of black quartz, judge my vow.</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:tdt-*, md:tdt-*, lg:tdt-*, and xxl:tdt-* to allow targeting specific utilities in different viewports.

Targeting hover states

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