// Font Import
@mixin import-font($font-list) {
	// Import once Google fonts.
	$url: get-font-url($font-list);
	@if $url {
		@import $url;
	}
	// Import once all local fonts in the list.
	@each $font in get-local-fonts($font-list) {
		@each $weight in get-local-font-weights($font) {
			$url: get-local-font-url($font, $weight);
			@if $url {
				@include font-face($font, $url, $weight);
			}
		}
	}
}

// Responsive Font Mixin
@mixin responsive-font($responsive, $min, $max: false, $fallback: false) {
    $responsive-unitless: $responsive / ($responsive - $responsive + 1);
    $dimension: if(unit($responsive) == 'vh', 'height', 'width');
    $min-breakpoint: $min / $responsive-unitless * 100;

    @media (max-#{$dimension}: #{$min-breakpoint}) {
        font-size: $min;
    }

    @if $max {
        $max-breakpoint: $max / $responsive-unitless * 100;

        @media (min-#{$dimension}: #{$max-breakpoint}) {
            font-size: $max;
        }
    }

    @if $fallback {
        font-size: $fallback;
    }

    font-size: $responsive;
}
