2 ms·
I think that only works when the svg is embedded in the html, not when it's pulled in from a separate file through something like an <img> tag.
by Izkata 2y ago
I think that only works when the svg is embedded in the html, not when it's pulled in from a separate file through something like an <img> tag.
- chrisandchris 2y agoYep, does only work with embedded SVG and not for foreign resources.
- Timwi 2y agoAlthough that's a good call as I hadn't considered that, I still don't see why you want to use a mask. Surely you just need two tiny SVG files and show only one or the other. And since they're tiny, I would absolutely embed them directly, which is why I didn't consider the case of an img tag.