Created
June 27, 2016 20:46
-
-
Save Donmclean/ba173dd44be43a86a35401be690819ca to your computer and use it in GitHub Desktop.
SASS MIXIN FOR FONT FACE
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