Bug 287114
| Summary: | text-decoration does not work with ::highlight() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Luca Casonato <hello> |
| Component: | Layout and Rendering | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Tim Nguyen (:ntim)
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
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
<rdar://problem/144725370>