Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Commit

Permalink
Adjust Gruntfile
Browse files Browse the repository at this point in the history
- Separate directories for fonts and CSS
- Add initial CSS template file
  • Loading branch information
Joen Asmussen committed Nov 6, 2017
1 parent 8bd649b commit b9fbfea
Show file tree
Hide file tree
Showing 9 changed files with 1,377 additions and 1,322 deletions.
26 changes: 15 additions & 11 deletions Gruntfile.js
Expand Up @@ -74,19 +74,23 @@ module.exports = function( grunt ) {
webfont: {
icons: {
src: 'svg-min/*.svg',
dest: 'icon-font'
dest: 'icon-font/fonts',
destCss: 'icon-font/css'
},
options: {
'engine': 'node',
'autoHint': false,
'normalize': true,
'optimize': false,
'font': 'dashicons',
'types': 'eot,woff2,woff,ttf',
'order': 'eot,woff,ttf',
'embed': true,
'descent': 0,
'htmlDemoTemplate': 'icon-font/demo-template.html',
engine: 'node',
autoHint: false,
normalize: true,
optimize: false,
font: 'dashicons',
types: 'eot,woff2,woff,ttf',
order: 'eot,woff,ttf',
embed: true,
descent: 0,
template: 'icon-font/css-template.css',
htmlDemo: true,
htmlDemoTemplate: 'icon-font/demo-template.html',
destHtml: 'icon-font',
templateOptions: {
baseClass: 'dashicons',
classPrefix: 'dashicons-',
Expand Down
53 changes: 53 additions & 0 deletions icon-font/css-template.css
@@ -0,0 +1,53 @@
/* Generated by grunt-webfont */

<% if (fontfaceStyles) { %>
<% if (fontSrc1 && embed.length) { %>
@font-face {
font-family:"<%= fontFamilyName %>";
src:<%= fontSrc1 %>;
font-weight:normal;
font-style:normal;
}
<% } %>@font-face {
font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
src:<%= fontSrc1 %>;<% }%>
src:<%= fontSrc2 %>;
font-weight:normal;
font-style:normal;
}
<% } %>
<% if (baseStyles) { %>.<%= baseClass %><% if (addLigatures) { %>,
.ligature-icons<% } %> {
<% if (stylesheet === 'less') { %>&:before {<% } %>
font-family:"<%= fontFamilyName %>";
<% if (stylesheet === 'less') { %>}<% } %>
display:inline-block;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}
<% } %>

<% 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] %><% } %>";
}<% } } } %>
1,303 changes: 1,303 additions & 0 deletions icon-font/css/dashicons.css

Large diffs are not rendered by default.

1,304 changes: 0 additions & 1,304 deletions icon-font/dashicons.css

This file was deleted.

13 changes: 6 additions & 7 deletions icon-font/dashicons.html

Large diffs are not rendered by default.

Binary file removed icon-font/dashicons.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added icon-font/fonts/dashicons.woff2
Binary file not shown.

0 comments on commit b9fbfea

Please sign in to comment.