/// FullScreen background with size cover and optional overlay on top (must be with rgba with opacity)
/// This one uses the `$image-path` variable to get to the img assets.
/// @group styling
/// @parameter {string} $image Specify which axes to center the element on.
/// @parameter {string} $color1 [null] - Optional color for the overlay
/// @parameter {string} $color2 [$color1] - Optional second color of the overlay
///
/// @example scss Input
///   .background {
///     @include background("a-background.jpg");
///   }
///
///   .background-with-overlay {
///     @include background("a-background.jpg", rgba(0, 0, 0, 0.5));
///   }
///
///   .background-with-2-overlays {
///     @include background("a-background.jpg", rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
///   }
///
/// @example css Output
///   .background {
///     background: url("a-background.jpg") no-repeat center/cover; }
///
///   .background-with-overlay {
///     background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("a-background.jpg") no-repeat center/cover; }
///
///   .background-with-2-overlays {
///     background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)), url("a-background.jpg") no-repeat center/cover; }

@mixin background($image, $color1: null, $color2: $color1) {
  @if $color1 != null {
    background: linear-gradient($color1, $color2), url("#{$image}") no-repeat (center / cover);
  }
  @else {
    background: url("#{$image}") no-repeat (center / cover);
  }
}
