// Correct dropdown colour
$dropdown-menu-item-color-active: $ebi-colour-dark;

// Generates base styles for a tag.
@mixin ebi-foundation-overides {
  // Resolve display of native dropdowns in FF and Safari
  // https://github.com/ebiwd/EBI-Framework/issues/58
  select {
    -moz-appearance: none;
    -webkit-appearance: none;
  }
}

// manually add back the foreground mixin
// https://github.com/ebiwd/EBI-Framework/issues/84
// @import 'node_modules/foundation-sites/scss/util/util/math';

/// Checks the lightness of `$color`, and if it passes the `$threshold` of lightness, it returns the `$yes` color. Otherwise, it returns the `$no` color. Use this function to dynamically output a foreground color based on a given background color.
///
/// @param {Color} $color - Color to check the lightness of.
/// @param {Color} $yes [$black] - Color to return if `$color` is light.
/// @param {Color} $no [$white] - Color to return if `$color` is dark.
/// @param {Percentage} $threshold [60%] - Threshold of lightness to check against.
///
/// @returns {Color} The $yes color or $no color.
@function foreground($color, $yes: $black, $no: $white, $threshold: 60%) {
  @if $color == transparent {
    $color: $body-background;
  }
  @if (lightness($color) > $threshold) {
    @return $yes;
  }
  @else {
    @return $no;
  }
}
