Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SVG use with external reference #3556

Open
alejandroiglesias opened this issue Jun 28, 2017 · 8 comments
Open

Add SVG use with external reference #3556

alejandroiglesias opened this issue Jun 28, 2017 · 8 comments

Comments

@alejandroiglesias
Copy link

It would be good to add this feature since the browser support is variable (no IE or old Safari).
How it looks like:

<!-- Reference IN THIS SAME DOCUMENT -->
<svg>
  <use xlink:href="#icon-1"></use>
</svg>

<!-- EXTERNAL reference -->
<svg>
  <use xlink:href="sprite.svg#icon-1"></use>
</svg>

More info:

@Ugoku
Copy link
Contributor

Ugoku commented Jun 30, 2017

+1

Edge 12 also doesn't support this, according to the svg4everybody polyfill

@kfbow
Copy link

kfbow commented Nov 18, 2017

Also xlink deprecation: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href.

@Herst
Copy link
Contributor

Herst commented Nov 18, 2017

+1

@mehulkar
Copy link

mehulkar commented Mar 9, 2018

+1. I just tried to look this up because of the xlink:href deprecation :)

@GPHemsley
Copy link

@Fyrd
Copy link
Owner

Fyrd commented Jan 8, 2022

I think the MDN data is just for support xlink:href, not specific to external references

@GPHemsley
Copy link

I think the MDN data is just for support xlink:href, not specific to external references

I thought <use xlink:href> and <use href> was all this issue was about. I'm not seeing any examples of other forms of external references.

@Zearin
Copy link
Contributor

Zearin commented Aug 21, 2022

MDN’s content for SVG is woefully incomplete. Don’t expect it to be as comprehensive or up-to-date for SVG as it is for HTML, CSS, and JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants