-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy path_icons.sass
41 lines (33 loc) · 1.33 KB
/
_icons.sass
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
35
36
37
38
39
40
41
@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')
@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
%<%= cssClass%>
+<%= cssClass%>-styles
@function <%= cssClass%>-char($filename)
$char: ""
<% _.each(glyphs, function(glyph) { %>
@if $filename == <%= glyph.fileName %>
$char: "\<%= glyph.codePoint %>"
<% }); %>
@return $char
@mixin <%= cssClass%>($filename, $insert: before, $extend: true)
&:#{$insert}
@if $extend
@extend %<%= cssClass%>
@else
+<%= cssClass%>-styles
content: <%= cssClass%>-char($filename)
<% _.each(glyphs, function(glyph) { %>.<%= cssClass%>-<%= glyph.fileName %>
+<%= cssClass%>(<%= glyph.fileName %>)
<% }); %>