Skip to content

Instantly share code, notes, and snippets.

@JNajera
Created July 14, 2013 21:21
Show Gist options
  • Select an option

  • Save JNajera/5996143 to your computer and use it in GitHub Desktop.

Select an option

Save JNajera/5996143 to your computer and use it in GitHub Desktop.
Generate multiple @font-face with SCSS from the Asset Pipeline
/////////////////////////
// Generale font-face
/////////////////////////
@each $font-face in font1, font2, font3, ... {
@font-face {
font-family: '#{$font-face}';
src: url(font-path('#{$font-face}.eot') + "?#iefix") format('embedded-opentype'),
url(font-path('#{$font-face}.woff')) format('woff'),
url(font-path('#{$font-face}.ttf')) format('truetype'),
url(font-path('#{$font-face}.svg') + "##{font-face}") format('svg');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment