CSS text-decoration-inset
- Category
- CSS
- Type
- Chromium catches up
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
CSS text-decoration-inset controls how far underlines, overlines, and line-through decorations are inset from or extended beyond text run edges. It supports auto, length, and percentage values, including one-value and two-value syntax for setting the start and end offsets. This lets developers adjust decoration spacing and create reveal effects with native text decorations instead of background gradients or additional elements. sampler: https://static.januschka.com/i-468928416/?asddsaasd MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-decoration-inset CL: https://chromium-review.googlesource.com/c/chromium/src/+/7748204
Motivation
This change implements CSS text-decoration-inset (CSS Text Decoration Level 4), including percentage values. It gives authors direct control over decoration inset and reduces the need for wrapper/pseudo-element workarounds used to fine-tune underline/overline/line-through rendering. sampler: https://static.januschka.com/i-468928416/?asddsaasd MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/text-decoration-inset CL: https://chromium-review.googlesource.com/c/chromium/src/+/7748204
Standards & signals
- Specification: https://drafts.csswg.org/css-text-decor-4/#propdef-text-decoration-inset
- Firefox: Shipped/Shipping — Firefox shipped `text-decoration-inset` in Firefox 146. Support for percentage values is still in progress: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/146#css
- Safari: Shipped/Shipping — WebKit has implemented `text-decoration-inset`, but support for percentage values is still pending. Implementation: https://bugs.webkit.org/show_bug.cgi?id=319178. Percentage support: https://bugs.webkit.org/show_bug.cgi?id=322441
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/468928416
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=css-text-decoration-inset
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+CSS%20text-decoration-inset
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=CSS%20text-decoration-inset
- Baseline status: https://webstatus.dev/?q=CSS%20text-decoration-inset