Bug 259063 - `currentColor` in `color-mix()` ignores selectors with `:visited` pseudo-class
Summary: `currentColor` in `color-mix()` ignores selectors with `:visited` pseudo-class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matthieu Dubet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-07-10 11:57 PDT by Niklas Ljunglöf
Modified: 2023-08-30 01:54 PDT (History)
7 users (show)

See Also:


Attachments
Testcase (221 bytes, text/html)
2023-08-21 09:11 PDT, Tim Nguyen (:ntim)
no flags Details
Testcase (256 bytes, text/html)
2023-08-21 09:12 PDT, Tim Nguyen (:ntim)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niklas Ljunglöf 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.
Comment 1 Radar WebKit Bug Importer 2023-07-17 11:58:18 PDT
<rdar://problem/112419198>
Comment 2 Tim Nguyen (:ntim) 2023-08-21 09:11:02 PDT
Created attachment 467368 [details]
Testcase
Comment 3 Tim Nguyen (:ntim) 2023-08-21 09:12:37 PDT
Created attachment 467369 [details]
Testcase
Comment 4 Matthieu Dubet 2023-08-22 07:03:42 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16928
Comment 5 EWS 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.