postxml-icon
v0.2.0
Published
PostXML plugin better svg icons usage
Downloads
15
Readme
postxml-icon
PostXML plugin better svg icons usage.
Installation
npm i postxml-icon --save-dev
Usage
Example
Input
<icon class="icon">name</icon>
Output
<svg class="icon">
<use xlink:href="#icon--name"></use>
</svg>
Example (inline)
Sprite should be inline!
Input
<icon class="icon" inline>name</icon>
<svg>
<symbol id="icon--name">
<path d="0,0 100, 100"></path>
</symbol>
</svg>
Output
<svg class="icon">
<path d="0,0 100, 100"></path>
</svg>
Licence
MIT