Closed jpdevries closed 10 months ago
I took a swing at getting us one step closer to this in https://github.com/tootsuite/mastodon/issues/1562
One question I'd have for maintainers would be, is there a preferred toolkit for perhaps automating building a folder of SVGs into a SVG sprite? I've done this with Grunt in the past, but I know Grunt isn't used in this project.
Or would we rather include the entire font-awesome set?
Yes yes yes for SVG, it makes much more sense semantically and technically than a font. Icons fonts were sort of a hack when more browsers supported webfonts than SVG properly, but are kind of obsolete now.
That leads me to something I was thinking for a while already: move, eventually, from FontAwesome to custom designed icons. FontAwesome is fine for prototypes or when no designer is around, but at one point icons are a crucial element of visual identity, and we surely can create an icon set that is just for Mastondon. Would love to work on this!
move, eventually, from FontAwesome to custom designed icons
I'm all for it! Even if the first step is building our icon set from a folder of SVGs that starts off as FontAwesome SVG source files, and then we Art Direct from there.
The PR that takes a step towards SVG icons isn't looking like it will be merged at this time but is still up for discussion. If you 👍 or 👎 SVG icons let's discuss!
https://github.com/tootsuite/mastodon/pull/1562#issuecomment-298158538
We totally need SVG icons. I’ve web fonts disabled because internet in the uk is spotty at best. All I get on my phone is a bunch of squares when I open the Mastodon web app:
Font-icons can cause issues for people with low-vision who replace the document font-family, there are possible work-arounds but using SVG is the preferred option, so this gets my vote.
(NB: The upcoming update to WCAG might incorporate this aspect.)
:+1:
@alastc you can also add people with dyslexia who are using a specific font replacing all fonts on websites and web applications (it's not a low-vision issue).
And SVG offers also better ways to label the meaning of an icon which is a good thing for people with screen readers or autistic people.
What’s the status on this and is there anything I can do to help?
Hey @Gargron, this ever gonna get fixed?
Here’s an example implementation on CodePen.
A good read, if reasons for switching to SVG are still needed: https://cloudfour.com/thinks/seriously-dont-use-icon-fonts/
SVG Images are just so powerful. They are particularly good when trying to deliver for dark mode.
Really enjoying Mastodon's excellent user interface. I've noticed the interface uses icons in a critical manor, so I think browser support here is important.
Support Analytics
SVG actually has a better caniuse score than webfonts.
SVG 97.96% safe (screenshot)
Webfonts 95.3% safe (screenshot)
To be fair, while SVG itself is over 97% safe to use the SVG
<use>
syntax is not as safe:But polyfills take SVG
<use>
back up to 97.96% safe.Note: Font Awesome 5 will ship with an SVG framework
The Un–Detectables
Users may leverage the user agent with user sheets or plugins that manipulate a web app's style to be more legible to them. Here is what the interface looks like when the FontAwesome font-face is overridden:
UI w/ icon font overriden (screenshot)
We have no way of detecting if a user has done this, so truth be told, web fonts are undetectably less than 95% safe to use.
Technical Difference
We'd be changing this:
to something like this:
Pros
<image>
fallback<SVG>
is more semantic for an icon.<SVG>
is for graphics,<i>
is for oblique textCons