svg – use

The use element in SVG allows nodes to be reused within the same document or in other documents by referencing their IDs.

<svg>
  <defs>
    <symbol id="icon-book-open" viewBox="">
      <path d="M20.804 ..."></path>
    </symbol>
  </defs>
</svg>

<svg class="snippets-icon-book-open">
  <use href="#icon-book-open"></use>
</svg>
 .snippets-icon-book-open {
      fill: #1f0004;
    }

Resources

Posted in Web

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.