NEW305974
filter: invert() not working on SVG with feGaussianBlur
https://bugs.webkit.org/show_bug.cgi?id=305974
Summary filter: invert() not working on SVG with feGaussianBlur
bitbof
Reported 2026-01-21 14:21:39 PST
Steps to Reproduce: - Open https://bitbof.github.io/browser-bug-demos/2026-01-21-safari-invert/ - The page contains three SVG images (img, background-image, inline svg) of a black path with <filter> feGaussianBlur - JavaScript applies the CSS class "theme-dark" to the document root. - This causes "filter: invert()" to be applied to all 3 images via the ".dark-invert" CSS class Expected: The SVG shapes with fill="black" should appear white after the CSS "filter: invert()" is applied. Actual: The SVG shapes remain black. The CSS "filter: invert()" is not correctly applied to any of the three SVG variations. Affected Version: Safari 26.2 (macOS, iOS) Works correctly on older versions and other browsers. I did not test on iPadOS 26.2.
Attachments
Chrome Canary vs Safari Technology Preview 235 (macOS Tahoe) (411.59 KB, image/png)
2026-01-21 15:47 PST, Ahmad Saleem
no flags
Expected vs Actual (58.72 KB, image/png)
2026-01-21 23:10 PST, bitbof
no flags
Ahmad Saleem
Comment 1 2026-01-21 15:46:36 PST
*** macOS 15.7.4 with Safari 18.6 *** First load fine and show all images but once it caches the page and if you do back forward navigation then `img element` and `background image` disappears. *** Safari Technology Preview 235 with macOS Tahoe *** Images remain and does not have issue of them disappearing. @bitbof - can you share expected vs broken screenshot because as of right now - Safari Technology Preview 235 and Chrome Canary 146 are matching for me. It might have been fixed but would be good to know what is an actual issue.
Ahmad Saleem
Comment 2 2026-01-21 15:47:45 PST
Created attachment 478095 [details] Chrome Canary vs Safari Technology Preview 235 (macOS Tahoe)
Simon Fraser (smfr)
Comment 3 2026-01-21 17:58:41 PST
Maybe fixed at 304143@main ?
bitbof
Comment 4 2026-01-21 23:10:41 PST
Created attachment 478097 [details] Expected vs Actual
bitbof
Comment 5 2026-01-21 23:13:53 PST
@Ahmed I attached a screenshot of how it looks when it's broken. Maybe it also matters that I've set my system theme to dark. (Mac settings > Appearance > Dark)
Ahmad Saleem
Comment 6 2026-01-21 23:26:32 PST
(In reply to bitbof from comment #5) > @Ahmed I attached a screenshot of how it looks when it's broken. > > Maybe it also matters that I've set my system theme to dark. (Mac settings > > Appearance > Dark) I have dark theme as well. Can you try Safari Technology Preview 235? It would be good to know, if we are both hitting something different or it is fixed on upstream already.
Ahmad Saleem
Comment 7 2026-01-21 23:28:13 PST
I just tried on my personal machine with Safari 26.2 vs STP235 and it seems that it is definitely fixed in STP235.
bitbof
Comment 8 2026-01-22 01:50:22 PST
That's good to hear. Do you still need me to check on 235?
Note You need to log in before you can comment on or make changes to this bug.