Created
August 11, 2015 15:04
-
-
Save keeprock/4688be4c9074856908b5 to your computer and use it in GitHub Desktop.
Font face mixin https://coderwall.com/p/4hd9bw/easy-embedding-of-web-fonts-using-a-sass-mixin https://github.com/magnetikonline/sassboilerplate/blob/master/fontface.scss
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
@mixin fontFace($family,$src,$style: normal,$weight: normal) { | |
@font-face { | |
font-family: $family; | |
src: url('#{$src}.eot'); // IE9 compat | |
src: url('#{$src}.eot?#iefix') format('embedded-opentype'), // IE8 and below | |
url('#{$src}.woff') format('woff'), // standards | |
url('#{$src}.ttf') format('truetype'), // Safari, Android, iOS | |
url('#{$src}.svg##{$family}') format('svg'); // legacy iOS | |
font-style: $style; | |
font-weight: $weight; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment