3 ms·
One nitpick-- for inline SVGs your ids and refs will be in the global namespace. So this won't work well if you want to have multiple inline SVGs, as multiply-d
by jancsika 4y ago
One nitpick-- for inline SVGs your ids and refs will be in the global namespace. So this won't work well if you want to have multiple inline SVGs, as multiply-defined ids aren't allowed in the DOM.
Luckily XML has namespaces. Contact your local XML specialist for details on how to use them to solve this problem...
hides behind bush, snickers as confused XML specialist tells you that XML namespaces cannot solve this problem
- bambax 4y agoIt's true that ids are in the global namespace; but as long as each id is unique you can have as many inline SVGs as you want. In fact, that's one benefit of this approach: define shapes once, name them, and then reference them. If you do it like this it's much easier to avoid id conflicts.