-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from backflip/feature/add-sass-template
Add sass template
- Loading branch information
Showing
5 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 %>) | ||
<% }); %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@font-face | ||
font-family: "Icons" | ||
src: url('../fonts/Icons.eot') | ||
src: url('../fonts/Icons.eot?#iefix') format('eot'), url('../fonts/Icons.woff') format('woff'), url('../fonts/Icons.ttf') format('truetype'), url('../fonts/Icons.svg#Icons') format('svg') | ||
|
||
@mixin custom-icon-styles | ||
font-family: "Icons" | ||
-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 | ||
|
||
|
||
%custom-icon | ||
+custom-icon-styles | ||
|
||
@function custom-icon-char($filename) | ||
$char: "" | ||
|
||
@if $filename == github | ||
$char: "\E001" | ||
|
||
@if $filename == git | ||
$char: "\E001" | ||
|
||
@if $filename == twitter | ||
$char: "\E002" | ||
|
||
@return $char | ||
|
||
|
||
@mixin custom-icon($filename, $insert: before, $extend: true) | ||
&:#{$insert} | ||
@if $extend | ||
@extend %custom-icon | ||
@else | ||
+custom-icon-styles | ||
|
||
content: custom-icon-char($filename) | ||
|
||
.custom-icon-github | ||
+custom-icon(github) | ||
.custom-icon-git | ||
+custom-icon(git) | ||
.custom-icon-twitter | ||
+custom-icon(twitter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters