Skip to content

Instantly share code, notes, and snippets.

@craigmdennis
Last active January 25, 2018 16:18
Show Gist options
  • Save craigmdennis/4d169fce0f6dc6ae2edf164a3385759e to your computer and use it in GitHub Desktop.
Save craigmdennis/4d169fce0f6dc6ae2edf164a3385759e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
$font-name: 'GT-Walsheim';
$font-path: '../fonts/';
$weights: (
400 'Regular',
300 'Light',
300 'Regular-Oblique' italic,
500 'Medium',
600 'Bold' bold);
@each $weight in $weights {
$int: nth($weight, 1);
$string: nth($weight, 2);
$src: '#{$font-path}#{$font-name}-#{$string}';
$length: length($weight);
@font-face {
font-family: 'GT Walsheim Pro';
font-weight: $int;
src: url('#{$src}.eot'); /* IE9 Compat Modes */
src: url('#{$src}.woff') format('woff'),
url('#{$src}.ttf') format('ttf'),
local('#{$font-name}-#{$string}');
@if ($length > 2) {
font-style: nth($weight, 3);
}
}
}
@font-face {
font-family: 'GT Walsheim Pro';
font-weight: 400;
src: url("../fonts/GT-Walsheim-Regular.eot");
/* IE9 Compat Modes */
src: url("../fonts/GT-Walsheim-Regular.woff") format("woff"), url("../fonts/GT-Walsheim-Regular.ttf") format("ttf"), local("GT-Walsheim-Regular");
}
@font-face {
font-family: 'GT Walsheim Pro';
font-weight: 300;
src: url("../fonts/GT-Walsheim-Light.eot");
/* IE9 Compat Modes */
src: url("../fonts/GT-Walsheim-Light.woff") format("woff"), url("../fonts/GT-Walsheim-Light.ttf") format("ttf"), local("GT-Walsheim-Light");
}
@font-face {
font-family: 'GT Walsheim Pro';
font-weight: 300;
src: url("../fonts/GT-Walsheim-Regular-Oblique.eot");
/* IE9 Compat Modes */
src: url("../fonts/GT-Walsheim-Regular-Oblique.woff") format("woff"), url("../fonts/GT-Walsheim-Regular-Oblique.ttf") format("ttf"), local("GT-Walsheim-Regular-Oblique");
font-style: italic;
}
@font-face {
font-family: 'GT Walsheim Pro';
font-weight: 500;
src: url("../fonts/GT-Walsheim-Medium.eot");
/* IE9 Compat Modes */
src: url("../fonts/GT-Walsheim-Medium.woff") format("woff"), url("../fonts/GT-Walsheim-Medium.ttf") format("ttf"), local("GT-Walsheim-Medium");
}
@font-face {
font-family: 'GT Walsheim Pro';
font-weight: 600;
src: url("../fonts/GT-Walsheim-Bold.eot");
/* IE9 Compat Modes */
src: url("../fonts/GT-Walsheim-Bold.woff") format("woff"), url("../fonts/GT-Walsheim-Bold.ttf") format("ttf"), local("GT-Walsheim-Bold");
font-style: bold;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment