@mixin navbar-vertical-align($element-height) {
  margin-top: (($navbar-height - $element-height) / 2);
  margin-bottom: (($navbar-height - $element-height) / 2);
}

// Classes to be applied for high ppi displays
// -------------------------
@mixin retina(){
  @media (min--moz-device-pixel-ratio: 1.3),
           (-o-min-device-pixel-ratio: 2.6/2),
      (-webkit-min-device-pixel-ratio: 1.3),
              (min-device-pixel-ratio: 1.3),
                  (min-resolution: 1.3dppx) {
    @content;
  }
}

// Common thumbnail properties
// -------------------------
@mixin thumb($parent, $size){
  #{$parent} {
    width: $size;

    > .glyphicon,
    > .fa{
      line-height: $size;
    }
  }
}

// Generates single property classes
// -------------------------
@mixin property-variants($base, $property, $variants: ()){
  @each $size, $value in $variants {
    @if $size == 'md'{
      #{$base} {
        #{$property}: $value;
      }
      #{$base}-n {
        #{$property}: $value;
      }
    }
    #{$base}-#{$size} {
      #{$property}: $value;
    }
    #{$base}-n-#{$size} {
      #{$property}: -$value;
    }
  }
}

@mixin keyframes($name){
  @-webkit-keyframes #{$name} {
    @content;
  }

  @keyframes #{$name} {
    @content;
  }
}

@mixin form-control-validation($color) {
  // Color the label and help text
  .form-control-feedback,
  .form-control-label,
  .form-check-label,
  .form-check-inline,
  .custom-control {
    color: $color;
  }

  // Set the border and box shadow on specific inputs to match
  .form-control {
    border-color: $color;

    @if $enable-rounded {
      &:focus {
        box-shadow: $input-box-shadow, 0 0 6px lighten($color, 20%);
      }
    }
  }

  // Set validation states also for addons
  .input-group-text{
    color: $color;
    border-color: $color;
    background-color: lighten($color, 40%);
  }
}

@mixin reset-filter() {
  filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
}