
@mixin opacity($opacity) {
  opacity: $opacity;
  // IE8 filter
  $opacity-ie: ($opacity * 100);
  filter: #{alpha(opacity=$opacity-ie)};
}

// Button variants
//
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons

@mixin button-variant($color, $background, $activeColor, $inverted: 0) {
  color: $color;

  @if $inverted != 0 {
  	background-color: #FFFFFF;
	} @else {
		background-color: $background;
	}
  border-color: $background;

  &:hover,
  &:focus,
  &.focus,
 /* &:active,
  &.active,*/
  .open > &.dropdown-toggle {
    color: $color;
    @if $inverted != 0 {
    	background-color: rgba(red($background), green($background), blue($background), 0.2);
    } @else {
    	background-color: darken($background, 5%);
      border-color: darken($background, 5%);
    }

    path {
      fill: $color;
    }
  }

  &:active,
  &.active,
  .open > &.dropdown-toggle {
		color: $activeColor;
  	background-color: darken($background, 10%);
    border-color: darken($background, 10%);
    background-image: none;

    path {
      fill: $activeColor;
    }
  }
  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    &,
    &:hover,
    &:focus,
    &.focus,
    &:active,
    &.active {
      @include opacity(0.6);
    }
  }

	path {
		fill: $color;
	}
}

// Button sizes
//Not using since padding needs to be down a level on the btn-content and line height was excluded and border-radius doesn't change
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
  padding: $padding-vertical $padding-horizontal;
  font-size: $font-size;
  /*line-height: $line-height;*/
  border-radius: $border-radius;
}




// User select
// For selecting text on the page

@mixin user-select($select) {
  -webkit-user-select: $select;
     -moz-user-select: $select;
      -ms-user-select: $select; // IE10+
          user-select: $select;
}


// WebKit-style focus
@mixin tab-focus() {
  // Default
  outline: thin dotted;
  // WebKit
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}