text-decoration-skip

A broader property that defines which parts of an element's content should be skipped by its text decorations. For example, you can tell an underline to skip spaces or the edges of the box.

It is documented as part of the CSS Text Decoration specification. This is an experimental technology. The syntax and behavior are still subject to change.

/* Usage Example */
div {
  text-decoration: underline;
  /* Tells the underline to skip over any empty spaces between words */
  text-decoration-skip: spaces;
}

/* Syntax */
text-decoration-skip: none;
text-decoration-skip: objects;
text-decoration-skip: spaces;
text-decoration-skip: leading-spaces;
text-decoration-skip: trailing-spaces;
text-decoration-skip: edges;
text-decoration-skip: box-decoration;

/* Global values */
text-decoration-skip: inherit;
text-decoration-skip: initial;
text-decoration-skip: revert;
text-decoration-skip: revert-layer;
text-decoration-skip: unset;
Widely available Since 2015 89% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

57+
12.1+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC