WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
309949
SVG favicons don't respect media query overrides
https://bugs.webkit.org/show_bug.cgi?id=309949
Summary
SVG favicons don't respect media query overrides
Pawel Grzybek
Reported
2026-03-13 23:57:13 PDT
Created
attachment 478679
[details]
The preview of favicon rendering in Chrome, Firefox and Safari (top to bottom order) SVG favicons don't respect media query overrides. Tested and reproduced on Safari Version 26.3. Here is a minimal reproduction example. ``` <!-- index.html --> <link rel="icon" href="/icon.svg" type="image/svg+xml" /> ``` ``` <!-- icon.svg --> <svg viewBox="0 0 100 100" xmlns="
http://www.w3.org/2000/svg
"> <style> .bg { fill: #ffffff; @media (prefers-color-scheme: dark) { fill: #000000; } } </style> <rect x="0" y="0" width="100" height="100" class="bg" /> </svg> ``` Here is an example of a website that uses this technique.
https://nn1.dev
Attachments
The preview of favicon rendering in Chrome, Firefox and Safari (top to bottom order)
(1011.26 KB, image/jpeg)
2026-03-13 23:57 PDT
,
Pawel Grzybek
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug