Last active
August 29, 2015 14:08
-
-
Save KittyGiraudel/9948b949c93bffac59e6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
| // ---- | |
| // libsass (v3.0) | |
| // ---- | |
| $base-path: '/assets/' !global; | |
| /// Mixin importing a `$font-name` font from `$file-name` file. | |
| /// @param {String} $font-name - Font name, meant to be used in `font-family` declarations | |
| /// @param {String} $file-name - File name without the extension | |
| /// @require {function} font | |
| /// @require $base-path | |
| /// @output A `@font-face` block. | |
| @mixin font($font-name, $file-name) { | |
| @font-face { | |
| font-family: quote($font-name); | |
| src: url($base-path + "fonts/" + $file-name + ".eot"); | |
| src: url($base-path + "fonts/" + $file-name + ".eot?#iefix") format("embedded-opentype"), | |
| url($base-path + "fonts/" + $file-name + ".woff") format("woff"), | |
| url($base-path + "fonts/" + $file-name + ".ttf") format("truetype"), | |
| url($base-path + "fonts/" + $file-name + ".svg##{$font-name}") format("svg"); | |
| font-weight: normal; | |
| font-style: normal; | |
| } | |
| } | |
| @include font('My Awesome Font', 'my-awesome-font'); |
This file contains hidden or 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
| @font-face { | |
| font-family: 'My Awesome Font'; | |
| src: url('/assets/fonts/my-awesome-font.eot'); | |
| src: url('/assets/fonts/my-awesome-font.eot?#iefix') format("embedded-opentype"), url('/assets/fonts/my-awesome-font.woff') format("woff"), url('/assets/fonts/my-awesome-font.ttf') format("truetype"), url('/assets/fonts/my-awesome-font.svg#My Awesome Font') format("svg"); | |
| font-weight: normal; | |
| font-style: normal; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment