Bug 259063

Summary: `currentColor` in `color-mix()` ignores selectors with `:visited` pseudo-class
Product: WebKit Reporter: Niklas Ljunglöf <slipped-gazette.0w>
Component: CSSAssignee: Matthieu Dubet <m_dubet>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, heycam, koivisto, m_dubet, simon.fraser, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/41707
Attachments:
Description Flags
Testcase
none
Testcase none

Niklas Ljunglöf
Reported 2023-07-10 11:57:43 PDT
How to reproduce: ``` a { background-color: white; &:link { color: navy }; &:visited { color: firebrick }; &:hover { background-color: color-mix(in srgb, currentColor, white 75%); }; } ``` Currently with this code, `currentColor` inherits `navy` instead of the expected `firebrick`. I know these pseudo-classes come with several restrictions due to privacy concerns, however I don't think they are relevant here since `currentColor` works as expected when not using `color-mix()`. Furthermore this issue does not seem to occur in Chrome or Firefox.
Attachments
Testcase (221 bytes, text/html)
2023-08-21 09:11 PDT, Tim Nguyen (:ntim)
no flags
Testcase (256 bytes, text/html)
2023-08-21 09:12 PDT, Tim Nguyen (:ntim)
no flags
Radar WebKit Bug Importer
Comment 1 2023-07-17 11:58:18 PDT
Tim Nguyen (:ntim)
Comment 2 2023-08-21 09:11:02 PDT
Created attachment 467368 [details] Testcase
Tim Nguyen (:ntim)
Comment 3 2023-08-21 09:12:37 PDT
Created attachment 467369 [details] Testcase
Matthieu Dubet
Comment 4 2023-08-22 07:03:42 PDT
EWS
Comment 5 2023-08-25 02:24:10 PDT
Committed 267271@main (7b938d011b0e): <https://commits.webkit.org/267271@main> Reviewed commits have been landed. Closing PR #16928 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.