Skip to content

Instantly share code, notes, and snippets.

@scheibome
Created November 18, 2015 21:05
Show Gist options
  • Save scheibome/8a1404a529fe17f4952f to your computer and use it in GitHub Desktop.
Save scheibome/8a1404a529fe17f4952f to your computer and use it in GitHub Desktop.
Font-Size per Viewport
@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