Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can even embed or link SVGs with CSS animations in them!


What, that's not true, is it? I think GitHub turns those into images, if I'm wrong. Could you link a example where someone embeds SVG with CSS animations?


GitHub sanitizes SVG animations by removing e.g. embedded JS code but SVG animated with CSS is supported in Markdown files. See for example [1] which contains [2].

[1] https://github.com/nbedos/termtosvg/blob/develop/README.md

[2] https://github.com/nbedos/termtosvg/blob/develop/docs/exampl...


This is an excellent example.


I'll try to remember to answer when I'm home. I have this working in a private repo so I'll make it public. Just checked it on my iPhone where it doesn't seem to work in Safari though so it's possible the support is not stellar. For sure worked in Firefox on my desktop though.


Maybe the CSS properties require the vendor prefix (i.e. -webkit-) to work in Safari. The same could be true for other browsers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: