A commit that landed in Chromium (and which will be available in Chrome 80) is support for SVG favicons. π
π¦ Firefox already has support for SVG favicons, ever since version 41
Since most (all?) browsers always make a request to favicon.ico
you can also serve an SVG at that location with the image/svg+xml
MIME Type β As per tip by Mathias
Above that it’s also possible to use prefers-color-scheme
in your SVG icon, thus supporting Light/Dark Mode:
π Chrome now accepts SVG favicons (crbug.com/294179#c73), which means you can style your icon with inline `prefers-color-scheme` and you'll get two icons for the price of one!
Demo: π dark-mode-favicon.glitch.me/ βοΈ
— Thomas Steiner (@tomayac) November 20, 2019
π There’s on small bug though: you need to refresh the page after changing to/from Dark Mode for the favicon to change.
Leave a comment