[Webkit-unassigned] [Bug 244025] New: `:visited` link color does not propagate to SVG through `currentColor`

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 17 01:46:50 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244025

            Bug ID: 244025
           Summary: `:visited` link color does not propagate to SVG
                    through `currentColor`
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: myakura.web at gmail.com

Created attachment 461688

  --> https://bugs.webkit.org/attachment.cgi?id=461688&action=review

test case - `:visited` + `fill="currentColor"`

Steps to reproduce:

1. open attachment or go to https://myakura.github.io/test--visited-currentcolor-svg/
2. look at the test case


Expected result:

There is a green square.


Actual result:

There is a red square, in Safari (15.6) and Safari TP (151). It is green in Firefox and Chrome.


Additional comments:

People build customizable icon system by utilizing `fill="currentColor"` set on inline SVGs.

* https://css-tricks.com/cascading-svg-fill-color/
* https://mayashavin.com/articles/svg-icons-currentcolor
* https://gomakethings.com/currentcolor-and-svgs/

However, WebKit doesn't propagate colors set on `:visited` elements. So if such icons are placed inside links, they won't look as expected.

https://stackoverflow.com/questions/68116594/safari-not-showing-visited-color-for-svg-icon-that-is-inside-an-anchor-tag

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220817/db98496f/attachment.htm>


More information about the webkit-unassigned mailing list