question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for linked external SVG sprite

See original GitHub issue

Hi, I recently learned this technique which allows you to build a custom icon system via a linked external SVG sprite.

So the icon of choice is written to the DOM like this:

<svg id="the-icon">
  <use xlink:href="sprite.svg#icon-of-choice"></use>
</svg>

The browser displays the right SVG, but it seems like Vivus cannot animate it. I guess this technique differs from what Vivus expect the SVG element to be.

I’m new to the use of SVG files and I don’t know if I’m asking for something stupid. If so, I’m really sorry and you can close the issue.

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maxwellitocommented, Feb 17, 2017

Here is the JSfiddle, I put some comments in it. Don’t hesitate to hack it. https://jsfiddle.net/svhf9jwz/

0reactions
maxwellitocommented, Feb 17, 2017

You’re welcome sir!! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVG `use` with External Reference, Take 2 - CSS-Tricks
Because of the lack of perfect support, there are two major workaround choices. Include the SVG sprite in all the HTML documents themselves....
Read more >
SVG sprite in external file - Stack Overflow
EDIT - Cross-browser support: Place SVG sprite elements in an XML file and call them into a defs element. XML file, named sprites.xml:...
Read more >
SVG Support for Image Sprites · Issue #685 - GitHub
I'd be very interested in SVG support for Compass Image Sprites, so PNGs would output a ... the sprite to be external, the...
Read more >
HTML : SVG sprite in external file - YouTube
HTML : SVG sprite in external file [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] HTML : SVG sprite in external file...
Read more >
SVG Sprite Workflow That Works - Medium
This SVG Sprite Workflow has been designed and developed in order to improve the current workflow when creating a CSS spritesheet at Squiz....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found