forked from thoughtbot/bourbon
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated font-face mixin to accept an asset-pipeline argument.
- Loading branch information
Phil LaPier
committed
Oct 24, 2012
1 parent
dd3d358
commit f93cf9e
Showing
1 changed file
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1,21 @@ | |||
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal ) { | @mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: false ) { | ||
@font-face { | @font-face { | ||
font-family: $font-family; | font-family: $font-family; | ||
font-weight: $weight; | |||
font-style: $style; | |||
|
|||
@if $asset-pipeline == true { | |||
src: font-url('#{$file-path}.eot'); | |||
src: font-url('#{$file-path}.eot?#iefix') format('embedded-opentype'), | |||
font-url('#{$file-path}.woff') format('woff'), | |||
font-url('#{$file-path}.ttf') format('truetype'), | |||
font-url('#{$file-path}.svg##{$font-family}') format('svg'); | |||
} @else { | |||
src: url('#{$file-path}.eot'); | src: url('#{$file-path}.eot'); | ||
src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'), | src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'), | ||
url('#{$file-path}.woff') format('woff'), | url('#{$file-path}.woff') format('woff'), | ||
url('#{$file-path}.ttf') format('truetype'), | url('#{$file-path}.ttf') format('truetype'), | ||
url('#{$file-path}.svg##{$font-family}') format('svg'); | url('#{$file-path}.svg##{$font-family}') format('svg'); | ||
font-weight: $weight; | } | ||
font-style: $style; | |||
} | } | ||
} | } |