NEW287114
text-decoration does not work with ::highlight()
https://bugs.webkit.org/show_bug.cgi?id=287114
Summary text-decoration does not work with ::highlight()
Luca Casonato
Reported 2025-02-05 13:16:43 PST
A custom `text-decoration` attribute inside of a `::highlight` selector does not work (for example the first example on MDN for CSS Custom Highlights: https://developer.mozilla.org/en-US/play?id=HAAIOUOYLTHEwSHpLBMb%2B9BfGhMmJlQ1o84DmT4hjDOw88l2N3nGGSeJTlo%2FdnKp%2FPDF6rodMZueNR4t). It works in Chromium.
Attachments
Tim Nguyen (:ntim)
Comment 1 2025-02-06 19:00:42 PST
What custom `text-decoration` value are you trying? Seems to be working fine to me. If you're using `text-decoration: blue underline` then that doesn't work yet because of a different bug (though you can use `text-decoration-color: blue; text-decoration-line: underline`)
Luca Casonato
Comment 2 2025-02-07 00:43:33 PST
Ah sorry, I had reused the example from a Gecko bug I filed. The specific case I was trying was `text-decoration: underline wavy red;`. Specifying those separately as with individual properties does work as you mention. Please mark this as duplicate with the issue for the composite property then (I can’t find it).
Radar WebKit Bug Importer
Comment 3 2025-02-12 13:17:16 PST
Note You need to log in before you can comment on or make changes to this bug.