Skip to content

Instantly share code, notes, and snippets.

@janwirth
Forked from Nitive/fonts.styl
Last active November 12, 2015 09:03
Show Gist options
  • Save janwirth/498ec95e89386dcfddae to your computer and use it in GitHub Desktop.
Save janwirth/498ec95e89386dcfddae to your computer and use it in GitHub Desktop.
Font face mixin for WOFF & WOFF2
// font-face mixin
font-url(file)
return 'fonts/' + file
webfont(family, file, weight = normal, style = normal)
@font-face
font-family family
file += '/' + file
url(font-url(file + '.woff2')) format('woff2'),
url(font-url(file + '.woff')) format('woff')
font-weight weight
font-style style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment