Skip to content

Instantly share code, notes, and snippets.

@aweary
Created December 12, 2014 20:03
Show Gist options
  • Save aweary/9f5091468f69c9428c1a to your computer and use it in GitHub Desktop.
Save aweary/9f5091468f69c9428c1a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$sans: sans-serif;
$serif: georgia, times;
$sans-font-styles: ("light": (300, normal), "regular": (400, normal), "semi-bold": (600, normal), "bold": (700, normal));
@each $style, $attr in $sans-font-styles {
%sans--#{$style} {
font-family: $sans;
font-weight: nth($attr, 1);
font-style: nth($attr, 2);
}
}
$serif-font-styles: ("light": (300, normal), "regular": (400, normal), "italic": (400, italic), "semi-bold": (600, italic));
@each $style, $attr in $serif-font-styles {
%serif--#{$style} {
font-family: $serif;
font-weight: nth($attr, 1);
font-style: nth($attr, 2);
}
}
.testClassSerif {
@extend %serif--light;
}
.testClassSans {
@extend %sans--regular;
}
.testClassSans {
font-family: sans-serif;
font-weight: 400;
font-style: normal;
}
.testClassSerif {
font-family: georgia, times;
font-weight: 300;
font-style: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment