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.
Syntax
/* 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;
text-decoration-skip Browser support
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.