Browse documentation

Reference / Typography

Decoration style and color

Style the stroke of a text decoration independently of the glyph color.

Working example

A decoration style becomes visible on a line such as underline. A dotted abbreviation convention also benefits from a written definition.

HTML
<p>Hover over <abbr title="Dots per inch" class="underline decoration-dotted decoration-neutral-500 underline-offset-4">DPI</abbr>
  to read the full term.</p>

Class reference

ClassCSS declarations
decoration-solidtext-decoration-style: solid;
decoration-doubletext-decoration-style: double;
decoration-dottedtext-decoration-style: dotted;
decoration-dashedtext-decoration-style: dashed;
decoration-wavytext-decoration-style: wavy;
decoration-neutral-500text-decoration-color: oklch(0.65 0 0);
View full generated CSS
Compiled CSS
.decoration-dashed {
  text-decoration-style: dashed;
}
.decoration-dotted {
  text-decoration-style: dotted;
}
.decoration-double {
  text-decoration-style: double;
}
.decoration-neutral-500 {
  text-decoration-color: oklch(0.65 0 0);
}
.decoration-solid {
  text-decoration-style: solid;
}
.decoration-wavy {
  text-decoration-style: wavy;
}