Skip to content

Commit

Permalink
Merge pull request #99 from primer/font_file_variable
Browse files Browse the repository at this point in the history
Adding the path variable to the scss file
  • Loading branch information
jonrohan authored Jun 16, 2016
2 parents 87da3f7 + fb7de5a commit ba3023a
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 42 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### HEAD

Fixes:

- Putting the `$octicons-font-path` back in the scss file.

### 4.1.0 (June 6, 2016)

Adds:
Expand Down
21 changes: 12 additions & 9 deletions build/font/_octicons.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
$octicons-font-path: "./" !default;


@font-face {
font-family:"Octicons";
src:url("octicons.eot?89624517212bc6232de6d7b6c801ca91");
src:url("octicons.eot?#iefix") format("embedded-opentype"),
url("octicons.woff2?89624517212bc6232de6d7b6c801ca91") format("woff2"),
url("octicons.woff?89624517212bc6232de6d7b6c801ca91") format("woff"),
url("octicons.ttf?89624517212bc6232de6d7b6c801ca91") format("truetype"),
url("octicons.svg?89624517212bc6232de6d7b6c801ca91#octicons") format("svg");
font-weight:normal;
font-style:normal;
font-family:"Octicons";
src:url("#{$octicons-font-path}octicons.eot?c0c33aeb9e311df3a64b40895eb56c03");
src:url("#{$octicons-font-path}octicons.eot?#iefix") format("embedded-opentype"),
url("#{$octicons-font-path}octicons.woff2?c0c33aeb9e311df3a64b40895eb56c03") format("woff2"),
url("#{$octicons-font-path}octicons.woff?c0c33aeb9e311df3a64b40895eb56c03") format("woff"),
url("#{$octicons-font-path}octicons.ttf?c0c33aeb9e311df3a64b40895eb56c03") format("truetype"),
url("#{$octicons-font-path}octicons.svg?c0c33aeb9e311df3a64b40895eb56c03#octicons") format("svg");
font-weight:normal;
font-style:normal;
}


Expand All @@ -28,6 +30,7 @@
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
speak: none;
}
.mega-octicon { font-size: 32px; }

Expand Down
19 changes: 10 additions & 9 deletions build/font/octicons.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

@font-face {
font-family:"Octicons";
src:url("octicons.eot?e8b041c217b3d809c380606d0320205a");
src:url("octicons.eot?#iefix") format("embedded-opentype"),
url("octicons.woff2?e8b041c217b3d809c380606d0320205a") format("woff2"),
url("octicons.woff?e8b041c217b3d809c380606d0320205a") format("woff"),
url("octicons.ttf?e8b041c217b3d809c380606d0320205a") format("truetype"),
url("octicons.svg?e8b041c217b3d809c380606d0320205a#octicons") format("svg");
font-weight:normal;
font-style:normal;
font-family:"Octicons";
src:url("octicons.eot?5e5746b1afa34d378ebe1091967df505");
src:url("octicons.eot?#iefix") format("embedded-opentype"),
url("octicons.woff2?5e5746b1afa34d378ebe1091967df505") format("woff2"),
url("octicons.woff?5e5746b1afa34d378ebe1091967df505") format("woff"),
url("octicons.ttf?5e5746b1afa34d378ebe1091967df505") format("truetype"),
url("octicons.svg?5e5746b1afa34d378ebe1091967df505#octicons") format("svg");
font-weight:normal;
font-style:normal;
}


Expand All @@ -28,6 +28,7 @@
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
speak: none;
}
.mega-octicon { font-size: 32px; }

Expand Down
Binary file modified build/font/octicons.eot
Binary file not shown.
4 changes: 2 additions & 2 deletions build/font/octicons.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/font/octicons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/font/octicons.ttf
Binary file not shown.
Binary file modified build/font/octicons.woff
Binary file not shown.
Binary file modified build/font/octicons.woff2
Binary file not shown.
20 changes: 10 additions & 10 deletions lib/font/template.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<% if (fontfaceStyles) { %>
<% if (fontSrc1 && embed.length) { %>
@font-face {
font-family:"<%= fontFamilyName %>";
src:<%= fontSrc1 %>;
font-weight:normal;
font-style:normal;
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;
font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
src:<%= fontSrc1 %>;<% }%>
src:<%= fontSrc2 %>;
font-weight:normal;
font-style:normal;
}
<% } %>

Expand All @@ -32,7 +32,7 @@
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
speak: none;
speak: none;
}
.mega-octicon { font-size: 32px; }
<% if (iconsStyles) { for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
Expand Down
22 changes: 12 additions & 10 deletions lib/font/template.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
$octicons-font-path: "./" !default;

<% if (fontfaceStyles) { %>
<% if (fontSrc1 && embed.length) { %>
@font-face {
font-family:"<%= fontFamilyName %>";
src:<%= fontSrc1 %>;
font-weight:normal;
font-style:normal;
font-family:"<%= fontFamilyName %>";
src:<%= fontSrc1.replace(/url\("/gi, "url(\"#{$octicons-font-path}") %>;
font-weight:normal;
font-style:normal;
}
<% } %>@font-face {
font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
src:<%= fontSrc1 %>;<% }%>
src:<%= fontSrc2 %>;
font-weight:normal;
font-style:normal;
font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
src:<%= fontSrc1.replace(/url\("/gi, "url(\"#{$octicons-font-path}") %>;<% }%>
src:<%= fontSrc2.replace(/url\("/gi, "url(\"#{$octicons-font-path}") %>;
font-weight:normal;
font-style:normal;
}
<% } %>
Expand All @@ -32,7 +34,7 @@
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
speak: none;
speak: none;
}
.mega-octicon { font-size: 32px; }
<% if (iconsStyles) { for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
Expand Down

0 comments on commit ba3023a

Please sign in to comment.