Skip to content

Commit

Permalink
Adds font url mixin...
Browse files Browse the repository at this point in the history
  • Loading branch information
sheriffderek committed Apr 22, 2016
1 parent 260173d commit d17ed7b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/stylus/_type.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@

// Fonts mixin
font-url(file)
return '../fonts/' + file

webfont(family, file, hack-chrome-windows = false, weight = 'normal')
@font-face
font-family family
src url(font-url(file + '.eot'))
src url(font-url(file + '.eot?#iefix')) format('embedded-opentype'),
url(font-url(file + '.woff')) format('woff'),
url(font-url(file + '.ttf')) format('truetype'),
url(font-url(file + '.svg#'+ family)) format('svg')
font-weight weight
font-style normal
if hack-chrome-windows
@media screen and (-webkit-min-device-pixel-ratio:0)
@font-face
font-family family
src url(font-url(file + '.svg#'+ family)) format('svg')

// type reset
h1, h2, h3, h4, h5, h6, li, p
margin: 0
Expand Down

0 comments on commit d17ed7b

Please sign in to comment.