/*
* Fluid values
*/

@mixin fluid($properties, $min-vw, $max-vw, $min-value, $max-value) {
  @each $property in $properties {
    #{$property}: $min-value;
  }
  @media screen and (min-width: $min-vw) {
    @each $property in $properties {
      #{$property}: calc(
        #{$min-value} +
          #{strip-unit($max-value - $min-value)} *
          (100vw - #{$min-vw}) /
          #{strip-unit($max-vw - $min-vw)}
      );
    }
  }
  @media screen and (min-width: $max-vw) {
    @each $property in $properties {
      #{$property}: $max-value;
    }
  }
}

/*
* Breakpoints
*/

// $breakpoints: (
//   'mobile':  $mobile,
//   'tablet': $tablet,
//   'desktop':  $desktop
// ) !default;

@mixin media($breakpoints, $minMax: 'min') {
  $min: nth($breakpoints, 1);

  @if length($breakpoints) > 1 {
    $max: nth($breakpoints, 2);
    @media screen and (min-width: $min) and (max-width: $max) {
      @content;
    }
  } @else {
    @media screen and (#{$minMax}-width: $min) {
      @content;
    }
  }
}
