-
-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar icon looks wildly different in different browsers/contexts #690
Comments
The idea behind this icon is to dynamically display the current date where supported, using JavaScript. We could have a separate static icon with path-based text. For now I've refactored the old icon to fix the issue with CSS not being applied (+some other fixes): <svg xmlns="http://www.w3.org/2000/svg"
aria-label="Calendar" role="img"
viewBox="0 0 512 512"
fill="#fff"><mask id="m"><rect
width="512" height="512"
rx="15%"/></mask><g mask="url(#m)" font-family="monospace"><path d="m0 0V512h512V0" fill="#dee"/><path d="m0 0V180h512V0" fill="#d34"/><path fill="#eab" d="m383.5 86a14 14 0 101 0h42a14 14 0 101 0h42a14 14 0 101 0zm0 43a14 14 0 101 0h42a14 14 0 101 0h42a14 14 0 101 0"/><text x="24.5" y="164" style="text-transform:uppercase" font-size="140">FEB</text><g fill="#677" text-anchor="middle"><text font-size="256" x="256" y="400">29</text><text font-size="64" x="256" y="480">Sunday</text></g></g><script><![CDATA[c=0;for(i in e={month:"short",day:"numeric",weekday:"long"})document.querySelectorAll("text")[c++].innerHTML=(new Date).toLocaleString(0,{[i]:e[i]})]]></script></svg> If someone could check compatibility in Safari and on Linux, I'll create a pull request |
It works on Linux - tried FF, Chrome, and Epiphany (which has the same rendering engine as Safari). |
Problem
https://github.com/edent/SuperTinyIcons in Chrome:
https://github.com/edent/SuperTinyIcons in Firefox:
Right-click, open image in new tab (looks similar in Firefox and Chrome):
Solution
Convert the text to paths so it looks the same regardless of what fonts are available.
The text was updated successfully, but these errors were encountered: