Created
May 8, 2015 17:51
-
-
Save procload/42052ffb860747cce1b7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Font Mixins | |
/////////////////////////////////////////////////////////////////////////////// | |
// | |
// Usage | |
// @include font(brandon, light-italic); | |
// @include font(brandon); | |
// @include font(brandon, bold); | |
// Etc. | |
// | |
$font-stack: | |
(group: brandon, id: light, font: ('Brandon Grot W01 Light', san-serif ), weight: 200, style: normal), | |
(group: brandon, id: light-italic, font: ('Brandon Grot W01 Light', san-serif ), weight: 200, style: italic), | |
(group: brandon, id: regular, font: ('Brandon Grot W01-Regular', san-serif), weight: 400, style: normal), | |
(group: brandon, id: regular-italic, font: ('Brandon Grot W01-Regular', san-serif), weight: 400, style: italic), | |
(group: brandon, id: bold, font: ('Brandon Grot W01 Black', san-serif), weight: 700, style: normal), | |
(group: brandon, id: bold-italic, font: ('Brandon Grot W01-Regular', san-serif), weight: 400, style: italic), | |
(group: clarendon, id: regular, font: ('Clarendon LT W01', serif), weight: 200, style: normal); | |
// Breakpoint Mixin | |
@mixin font($group, $id:regular){ | |
@each $font in $font-stack{ | |
@if($group == map-get($font, group) and $id == map-get($font, id)){ | |
font-family: map-get($font, font); | |
font-weight: map-get($font, weight); | |
font-style: map-get($font, style); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment