Created
November 18, 2015 21:05
-
-
Save scheibome/8a1404a529fe17f4952f to your computer and use it in GitHub Desktop.
Font-Size per Viewport
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
@mixin font-size($fs-map) { | |
@each $val in $fs-map { | |
$fs-breakpoint: nth($val, 1); | |
$fs-font-size: nth($val, 2); | |
$fs-font-color: nth($val, 3); | |
@if $fs-breakpoint == null { | |
font-size: $fs-font-size; | |
@include font-color($fs-font-color); | |
} | |
@else { | |
@media screen and (min-width: $fs-breakpoint) { | |
font-size: $fs-font-size; | |
@include font-color($fs-font-color); | |
} | |
} | |
} | |
} | |
@mixin font-color($fs-font-color) { | |
@if $fs-font-color { | |
color: $fs-font-color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment