-
Notifications
You must be signed in to change notification settings - Fork 40
/
webfont-css-generator-template.css
132 lines (128 loc) · 4.46 KB
/
webfont-css-generator-template.css
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* Generated by grunt-webfont */
/* Based on https://github.com/endtwist/fontcustom/blob/master/lib/fontcustom/templates/fontcustom.css */
<%= codePrefix %>
<% if (fontfaceStyles) { %>
<% if (fontSrc1 && embed.length) { %>
@font-face {
font-family:"<%= fontBaseName %>";
src:<%= fontSrc1 %>;
font-weight:normal;
font-style:normal;
}
<% } %>@font-face {
font-family:"<%= fontBaseName %>";<% if (fontSrc1) { %>
src:<%= fontSrc1 %>;<% }%>
src:<%= fontSrc2 %>;
font-weight:normal;
font-style:normal;
}
<% } %>
<% if (baseStyles) { %>
<% if (baseStyles) { %>.<%= baseClass %><% if (addLigatures) { %>,
.ligature-icons<% } %> {
font-family:"<%= fontBaseName %>";
display:inline-block;
vertical-align:middle;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:optimizeLegibility;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}
<% } %>
/* Bootstrap Overrides */
[class^="<%= classPrefix %>"]:before,
[class*=" <%= classPrefix %>"]:before<% if (ie7) {%>,
[class^="<%= classPrefix %>"],
[class*=" <%= classPrefix %>"]<% } %><% if (addLigatures) { %>,
.ligature-icons<% } %> {
font-family:"<%= fontBaseName %>";
display:inline-block;
vertical-align:middle;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:optimizeLegibility;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}<% } %>
<% if (iconsStyles && stylesheet === 'less') { %>
/* Mixins */
<% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
.<%= classPrefix %><%= glyphs[glyphIdx] %><% if(glyphIdx === glyphs.length-1) { %> { <% } else { %>, <% } } %>
&:before {
font-family:"<%= fontBaseName %>";
display:inline-block;
font-weight:normal;
font-style:normal;
text-decoration:inherit;
}
}<% } %>
<% if (extraStyles) { %>
a [class^="<%= classPrefix %>"],
a [class*=" <%= classPrefix %>"] {
display:inline-block;
text-decoration:inherit;
}
/* Makes the font 33% larger relative to the icon container */
.<%= classPrefix %>large:before {
vertical-align:top;
font-size:1.333em;
}
/* Keeps button heights with and without icons the same */
.btn [class^="<%= classPrefix %>"],
.btn [class*=" <%= classPrefix %>"] {
line-height:0.9em;
}
li [class^="<%= classPrefix %>"],
li [class*=" <%= classPrefix %>"] {
display:inline-block;
width:1.25em;
text-align:center;
}
/* 1.5 increased font size for <%= classPrefix %>large * 1.25 width */
li .<%= classPrefix %>large[class^="<%= classPrefix %>"],
li .<%= classPrefix %>large[class*=" <%= classPrefix %>"] {
width:1.875em;
}
li[class^="<%= classPrefix %>"],
li[class*=" <%= classPrefix %>"] {
margin-left:0;
list-style-type:none;
}
li[class^="<%= classPrefix %>"]:before,
li[class*=" <%= classPrefix %>"]:before {
text-indent:-2em;
text-align:center;
}
li[class^="<%= classPrefix %>"].<%= classPrefix %>large:before,
li[class*=" <%= classPrefix %>"].<%= classPrefix %>large:before {
text-indent:-1.333em;
}
<% } %>
<% if (iconsStyles) { %>/* Icons */<% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
<% if (stylesheet === 'less') { %>
.<%= classPrefix %><%= glyphs[glyphIdx] %> {
&:before {
content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
}
<% if (ie7) {%>
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
<% } %>
}<% } else { %>
<% if (ie7) {%>.<%= classPrefix %><%= glyphs[glyphIdx] %> {
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
}
<% } %>
.<%= classPrefix %><%= glyphs[glyphIdx] %>:before {
content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
}<% } %>
<% } } %>
<%= codeSuffix %>