Bug 309949

Summary: SVG favicons don't respect media query overrides
Product: WebKit Reporter: Pawel Grzybek <mail>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: nileshprajapati, tomac
Priority: P2    
Version: Safari 26   
Hardware: Mac (Apple Silicon)   
OS: macOS 26   
Attachments:
Description Flags
The preview of favicon rendering in Chrome, Firefox and Safari (top to bottom order) none

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
Note You need to log in before you can comment on or make changes to this bug.