Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A shorthand @font-face mixin
.font(@family, @url, @weight: normal, @style: normal) {
@font-face {
font-family: @family;
src: url('@{url}.eot'); // IE9 Compat Modes
src: url('@{url}.eot?#iefix') format('embedded-opentype'), // IE6-IE8
url('@{url}.woff') format('woff'), // Modern Browsers
url('@{url}.ttf') format('truetype'); // Safari, Android, iOS
// url('@{url}.svg') format('svg'); // Legacy iOS, pre-4.2, unecessary if not supporting that far.
font-weight: @weight;
font-style: @style;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.