jonathantneal / svg4everybody

Use external SVG spritemaps today
https://jonneal.dev/svg4everybody/
Other
3.29k stars 354 forks source link

xlink:href is deprecated and possibly will be omitted in future #128

Open kamlekar opened 7 years ago

kamlekar commented 7 years ago

Hi xlink:href is deprecated in SVG 2.0 according to MDN doc.

So, we should use href attribute like

<use href="sprite.svg#facebook" />

But Safari 9 doesn't support it. So, I am presuming we can use both xlink:href and href attributes for compatibility like:

<use xlink:href="sprite.svg#facebook" href="sprite.svg#facebook" />

^ Maybe we can do this with in script itself.

timeiscoffee commented 7 years ago

This should be fixed by https://github.com/jonathantneal/svg4everybody/pull/79, which was for this same issue https://github.com/jonathantneal/svg4everybody/issues/78.

Seems like files under dist have not been updated though :(

ivnmaksimovic commented 7 years ago

So what should be use now after #79 ? xlink:href of just href. Maybe README should be updated, if href is the way to go.

kamlekar commented 7 years ago

@ivnmaksimovic definitely href is way to go but for backward compatibility mentioning both attributes is better in my opinion.

timeiscoffee commented 7 years ago

@ivnmaksimovic @kamlekar actually, I think the support for href is pretty good atm (according to the MDN documentation). I think we should update the README and tests accordingly.

DanielRuf commented 6 years ago

But Safari is still a blocker. So both should be used.

DanielRuf commented 6 years ago

https://github.com/hyperapp/hyperapp/pull/211#issuecomment-321184108

ezeikel commented 6 years ago

Still an issue in Safari 11.0.3