Curious why this uses svg "stacking" vs. multiple symbols (which seems like a more modern approach): https://css-tricks.com/svg-symbol-good-choice-icons/
Or is there a way to implement this behavior I'm missing?
Ah ok...I guess I was a bit confused, it appears you _are_ doing multiple symbols w/ IDs.
But then you're also calling those symbols with <use> and using the :target technique.
Why do we need to do both?
What do you mean by target technique?
This css is included in the sprite:
<style>use {display: none;} use:target {display: inline;}</style>
<symbols> with <defs>.<use> tagThis seems to be mixing 2 different techniques.
If you have symbols, that's all you need (AFAIK).
This is only necessary when you're stacking with <defs> / <g> elements. If you're using symbol, they don't display as you define them.
Because if you refer to image in external sprite, e.g. .logo {background-image: url(sprite.svg#symbol_id)} symbol won't renders by itself, you should render it manually. That's why :target is used.
@kisenka Ah, I didn't realize that!
I thought a fragment identifier for a symbol would display (though I knew there were browser compat. issues).
Thanks!
@kisenka Should we document it maybe?
@princed yep