text-decoration-inset
An experimental property that allows you to adjust the position of an underline or overline, pushing it closer to or further away from the text baseline.
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 */
span {
text-decoration: underline;
/* Pushes the underline 2px further down from the text */
text-decoration-inset: 2px;
}
/* Syntax */
text-decoration-inset: auto;
/* Global values */
text-decoration-inset: inherit;
text-decoration-inset: initial;
text-decoration-inset: revert;
text-decoration-inset: revert-layer;
text-decoration-inset: unset;
text-decoration-inset Browser support
Limited availability
Since
2020 2% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
146+