4 ms·
Interesting. Perhaps the problem is the use of SVG. SVG requires specifying a colour, yet it's going to be discarded by the browser. Maybe what's needed is a p
by TazeTSchnitzel 11y ago
Interesting.
Perhaps the problem is the use of SVG. SVG requires specifying a colour, yet it's going to be discarded by the browser. Maybe what's needed is a proper mask format? Some subset of SVG? If that were used, then browsers which don't support it would naturally skip it, whereas currently browsers which don't support the masking display the SVG with the colour it specified.
- smackfu 11y agoIt seems like the intent here was that someone like Twitter would provide a blue bird icon in SVG, and then specify that it is also suitable for use as a mask by providing the "mask" attribute. That icon could be used both for normal favicons and for this mask. Instead Twitter provided a black bird.
- deleted 11y ago[deleted]
- mcintyre1994 11y agoApple's documentation [0] says to use black: > You can set the icon that the user sees when they pin your site by providing a vector image. Use 100% black for all vectors with a transparent background in SVG format [0] https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9.html https://developer.apple.com/library/prerelease/mac/releaseno... (ctrl+f pinned tabs)
- smackfu 11y agoInteresting, since their proposal says: "A simple author opt-in saying that an icon is suitable would help UAs pick the right icon to download and, unlike the sizes and type attributes, there's no need for a complicated attribute value microsyntax." Mandating that it also has to be black seems like it would eliminate most existing favicons.
- jessaustin 11y agoEspecially since it would have been easy for the browser to derive an all-black mask from any image. Then sites only have to do extra work in order to support the new functionality, as opposed to what we see here where they have to do extra work in order not to break.
- stephenr 11y agoAn apple dev actually replied and said you can use other colours but because its interpreted as a mask, non-black makes the result translucent.
- ygra 11y agoTechnically SVG doesn't require a colour. In absence of a fill colour renderers will render shapes in black anyway. Furthermore, SVG supports masking already: http://www.w3.org/TR/SVG/masking.html#Masking http://www.w3.org/TR/SVG/masking.html#Masking – although the use of black there would mean transparent, not opaque. Wouldn't be terribly bad to align the feature with the spec in that regard, though. As far as I understood it, the intended result is essentially a single-colour image, masked by the given SVG.