-
Notifications
You must be signed in to change notification settings - Fork 0
/
_font.styl-temp
34 lines (31 loc) · 1006 Bytes
/
_font.styl-temp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@font-face {
font-family: "<%= fontName %>";
src: url('<%= fontPath %><%= fontName %>.eot');
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'),
url('<%= fontPath %><%= fontName %>.woff') format('woff'),
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'),
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg');
font-weight: normal;
font-style: normal;
}
$<%= className %> {
display: inline-block;
font-family: "<%= fontName %>";
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
$<%= className %>-map = {
<% _.each(glyphs, function (glyph) { %>'<%= glyph.name %>': '\<%= glyph.codepoint.toString(16).toUpperCase() %>',
<% }); %>
}
<%= className %>($icon-name = false) {
if $icon-name && $<%= className %>-map[$icon-name] {
&::before {
@extend $<%= className %>;
content: $<%= className %>-map[$icon-name];
}
}
}