Skip to content

Instantly share code, notes, and snippets.

@prosenjit-manna
Created August 25, 2017 07:16
Show Gist options
  • Save prosenjit-manna/4f0cbfd99eaf4ab1bf2230c865d6c823 to your computer and use it in GitHub Desktop.
Save prosenjit-manna/4f0cbfd99eaf4ab1bf2230c865d6c823 to your computer and use it in GitHub Desktop.
_icons.scss
@font-face {
font-family: "<%= fontName %>";
src:url('./assets/fonts/<%= fontName %>.woff') format('woff'),
url('./assets/fonts/<%= fontName %>.ttf') format('truetype'),
url('./assets/fonts/<%= fontName %>.svg#<%= fontName %>') format('svg');
}
@mixin <%= cssClass%>-styles {
font-family: "<%= fontName %>";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-style: normal;
font-variant: normal;
font-weight: normal;
// speak: none; // only necessary if not using the private unicode range (firstGlyph option)
text-decoration: none;
text-transform: none;
}
@import '_icons-variables.scss';
.<%= cssClass%> {
@include <%= cssClass%>-styles;
}
<% _.each(glyphs, function(glyph) { %>.<%= cssClass%>-<%= glyph.fileName %>:before {
@extend .<%= cssClass%>;
content: $<%= cssClass%>-<%= glyph.fileName %>;
}
<% }); %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment