3 ms·
> you need to embed it directly. Guess what “DOM integration” means. > SVG is so bad people have been using fonts instead Icon fonts have been out of fashion
by oefrha 4y ago
> you need to embed it directly.
Guess what “DOM integration” means.
> SVG is so bad people have been using fonts instead
Icon fonts have been out of fashion for so long I almost suspect you time traveled from the past.
- IshKebab 4y ago> Guess what "DOM integration" means. Does it mean unusably inconvenient? Because that's what I call having to embed SVGs just so CSS works with them.
- ttfkam 4y agoHold up. Are you blaming SVG because you don't know the <object> tag exists? I mean, yeah, you're right that CSS won't come through with an <img> tag. It will with <object> though. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ob...
- IshKebab 4y agoNo I am not. https://stackoverflow.com/a/34902454/265521 https://stackoverflow.com/a/34902454/265521
- ttfkam 4y agoAh, I misunderstood what you were trying to accomplish. Yes, it makes sense that you have to embed the SVG in your HTML doc. SVG isn't an image format; it's a document format just like HTML is. Embedding the SVG puts it in the same document context as the HTML and therefore the same styling context. Would you expect a parent's CSS to affect HTML in an iframe, a separate document context? That would be confusing behavior to be sure. Side effects galore.
- IshKebab 4y agoNo I wouldn't, because a) iframes are used to provide isolation, and b) nobody really wants that. The use case for styling external SVGs with CSS is waaay more obvious. We should at least have the option to do it, even if it isn't enabled by default.
- jansan 4y agoJust out of curiosity, what has replaced icon fonts?
- cantSpellSober 4y agoGraphics (typically vector), GitHub has a good writeup on the why * font rendering issues * rendering improvements * accessibility * ease of authoring * can be animated https://github.blog/2016-02-22-delivering-octicons-with-svg/#:~:text=February%2022%2C%202016-,GitHub.com%20no%20longer%20delivers%20its%20icons%20via%20icon%20font,benefits%20of%20the%20SVG%20icons https://github.blog/2016-02-22-delivering-octicons-with-svg/.... https://speakerdeck.com/ninjanails/death-to-icon-fonts https://speakerdeck.com/ninjanails/death-to-icon-fonts
- ttfkam 4y agoFont folks also really underestimated how much people like having access to graphics with more than one color.
- makapuf 4y agoThey didn't: https://fonts.google.com/knowledge/introducing_type/introducing_color_fonts https://fonts.google.com/knowledge/introducing_type/introduc... (is that a good idea for icons, not sure though)
- ttfkam 4y agoAre you really going to compare a technology like SVG that was supported by IE9 (and lower with a plugin) with one only just supported by the Blink engine May, 2022 in Chrome 101? For all intents and purposes with regard to web development, fonts have been monochromatic (except for emojis). Any with sufficient knowledge gathered over decades can write/edit an SVG in the editor of their choice, graphical or textual. How does one edit their own color font? Can you do it in a text editor? Do most font editing programs support it? Or were you speaking of fonts purely as a consumer rather than a producer?