Since you can put CSS in an SVG, would a `prefers-color-scheme: dark` media query be enough for dark mode support?
-
-
-
Test case: https://numerous-sulfur.glitch.me The media query is ignored.
@jaffathecake had an interesting write-up on how media queries behave in SVG across browsers: https://jakearchibald.com/2016/svg-media-queries/ … This behavior seems to follow from that. - 2 more replies
New conversation -
-
-
Genuine question: Pro tip or a hack that happens to work? Doesn’t seem like a best practice to me(?)
-
Which part exactly? All browsers request /favicon.ico by default (see link in tweet for my old write-up). And file extensions don’t matter on the web; MIME types do. I see nothing wrong with this.
- 3 more replies
New conversation -
-
-
Is the recommendation to use server-side browser sniffing to know when SVG is supported, or is there a clean way to statically return ICO/PNG/SVG in a way that lets the browser choose?
-
The static solution is to use <link rel="icon" type="…">. For a server-side solution, browser sniffing seems overkill for this purpose. If we could tweak the Accept header Chrome sends for such requests, it might be easier: https://bugs.chromium.org/p/chromium/issues/detail?id=294179#c73 …
- 1 more reply
New conversation -
-
-
What I dislike is that ICO file format is originally a container for BMP and PNG. So having a favicon.ico served with mime-type image/svg+xml sounds semantically wrong to me ^^
-
Both URLs in my tweet don't have any extensions at all. The same goes for the Twitter URL of this very tweet. Is that semantically wrong too? It's just a URL. Extensions don't matter on the web; MIME types do.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
Chrome now supports SVG favicons! 
