Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 749 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 749 Bytes

Octicons Sprite File

This repo contains a SVG sprite version of the Octicons (v.10.0.0) generated with the provided svg-sprite-maker.js NodeJS script.

Using the sprite file

Declare a <svg> tag and simply <use> the desired icon. For example, using the "project-24" icon is achieved with the following:

<svg>
  <use xlink:href="octicons-sprite.svg#project-24"></use>
</svg>

Note that most browsers block cross-origin requests for the <use> tag, so you should probably host your own copy of the sprite file.

Generating another sprite file

Use the provided svg-sprite-maker.js:

node ./svg-sprite-maker.js /path/to/svg/directory > output-sprite.svg