Background
I have recently read an article which talks about self-hosting your static assets and explains the risk of using CDN's or external infrastructure. This got me to think on hosting fonts & icons myself.
I'm aware that you can self-host fonts by downloading a font and using the file-path as a URL - to include that in your CSS. And you can also download or create an SVG for any icon and use it as a HTML element.
Question
But is it possible to use a self-hosted SVG in a CSS pseudo element like in the content property :before
and :after
? Similar to how Font Awesome allows you to mention content code for their icons
Note: My main intention is re-usability of same SVG in multiple CSS classes