-
Notifications
You must be signed in to change notification settings - Fork 81
/
_icons.less
41 lines (36 loc) · 1.44 KB
/
_icons.less
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<%= cacheBusterQueryString %>');
src: url('<%= fontPath %><%= fontName %>.eot?<%= cacheBuster %>#iefix') format('eot'),
url('<%= fontPath %><%= fontName %>.woff2<%= cacheBusterQueryString %>') format('woff2'),
url('<%= fontPath %><%= fontName %>.woff<%= cacheBusterQueryString %>') format('woff'),
url('<%= fontPath %><%= fontName %>.ttf<%= cacheBusterQueryString %>') format('truetype'),
url('<%= fontPath %><%= fontName %>.svg<%= cacheBusterQueryString %>#<%= fontName %>') format('svg');
}
.<%= cssClass%>-base-pseudo {
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%>-char(@filename) {
<% _.each(glyphs, function(glyph) { %>@<%= glyph.fileName %>: "\<%= glyph.codePoint %>";
<% }); %>
content: @@filename;
}
.<%= cssClass%>(@filename, @insert: before) {
@pseudo-selector: ~":@{insert}";
&@{pseudo-selector} {
&:extend(.<%= cssClass%>-base-pseudo);
.<%= cssClass%>-char(@filename);
}
}
<% _.each(glyphs, function(glyph) { %>.<%= cssClass%>-<%= glyph.fileName %> {
.<%= cssClass%>(<%= glyph.originalFileName ? glyph.originalFileName : glyph.fileName %>);
}
<% }); %>