Great “hack” popularized by Lea Verou (but first discovered by Leandro): if you place an emoji inside <text>
in an SVG Favicon you instantly have an Emoji Favicon 🙂
Now that all modern browsers support SVG favicons, here's how to turn any emoji into a favicon.svg:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<text y=".9em" font-size="90">💩</text>
</svg>Useful for quick apps when you can't be bothered to design a favicon!
— Lea Verou (@LeaVerou) March 22, 2020
Beware of potential clipping on various platforms though, as emoji differ per platform.
Leave a comment