Skip to content

Instantly share code, notes, and snippets.

@pavlo-bondarchuk
Created July 24, 2024 22:23
Show Gist options
  • Save pavlo-bondarchuk/23d76db7d12f4f87e68716b0c5d0d925 to your computer and use it in GitHub Desktop.
Save pavlo-bondarchuk/23d76db7d12f4f87e68716b0c5d0d925 to your computer and use it in GitHub Desktop.
use svg - right way
<main>
<svg class="icon">
<use xlink:href="#icon"></use>
</svg>
</main>
<footer>
<!-- some content-->
<!-- inline svg in html -->
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon" viewBox="0 0 24 24">
<path d="M12 2L2 22h20L12 2z"/>
</symbol>
</svg>
</footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment