text-underline-offsetBaseline · Widely available
The text-underline-offset CSS property shifts underlines on text from the initial position by a given distance. The initial position is affected by the text-underline-position property.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Nov 19, 2020. Widely available since May 19, 2023.
Browser support
DesktopChrome
1–86Not supported
87+Supportedsince Nov 17, 2020
Current: 155Edge
12–86Not supported
87+Supportedsince Nov 19, 2020
Current: 154Firefox
1–69Not supported
70+Supportedsince Oct 22, 2019
Current: 157Safari
1–12Not supported
12.1+Supportedsince Mar 25, 2019
Current: 27MobileChrome Android
18–86Not supported
87+Supportedsince Nov 17, 2020
Current: 155Firefox Android
4–68Not supported
79+Supportedsince Jul 28, 2020
Current: 157Safari iOS
1–12Not supported
12.2+Supportedsince Mar 25, 2019
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: text-underline-offset.
Feature detection
CSS · check before using
@supports (text-underline-offset: initial) {
/* styles that rely on text-underline-offset */
}
/* or in JavaScript */
if (CSS.supports("text-underline-offset", "initial")) {
// use it
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (3). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| text-underline-offset | 87 | 87 | 70 | 12.1 | 87 | 79 | 12.2 |
| text-underline-offset.auto | 87 | 87 | 70 | 12.1 | 87 | 79 | 12.2 |
| text-underline-offset.percentage | 87 | 87 | 74 | 18.2 | 87 | 79 | 18.2 |