Created
April 13, 2016 15:06
-
-
Save alexcarpenter/ee333fb3c620dd0471c89ddd223247d2 to your computer and use it in GitHub Desktop.
Sprite macro from https://github.com/vigetlabs/gulp-starter/blob/master/src/html/macros/helpers.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% macro sprite(id, viewBox, classes) %} | |
{% set viewBox = viewBox or "0 0 1 1"%} | |
<span class='sprite -{{id}} {{classes}}'> | |
<svg viewBox="{{viewBox}}"><use xlink:href='images/icons.svg#{{id}}' /></use></svg> | |
</span> | |
{% endmacro %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment