Bug 287114

Summary: text-decoration does not work with ::highlight()
Product: WebKit Reporter: Luca Casonato <hello>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, hello, megan_gardner, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 18   
Hardware: Mac (Apple Silicon)   
OS: macOS 15   
See Also: https://bugs.webkit.org/show_bug.cgi?id=205228
Bug Depends on:    
Bug Blocks: 316075    

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.