//
// Mixins
// --------------------------------------------------


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

// Center-align a block level element
@mixin center-block() {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

// Sizing shortcuts
@mixin size($width, $height) {
  width: $width;
  height: $height;
}
@mixin square($size) {
  @include size($size, $size);
}


// Placeholder text
@mixin selected($color, $background) {
  &::selection {
    background: $background; /* Safari */
    color: $color;
  }
  &::-moz-selection {
    background: $background; /* Safari */
    color: $color;
  }
}

// Text overflow
// Requires inline-block or block for proper styling
@mixin text-overflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@mixin invisible(){
  visibility:hidden;
}
// CSS3 PROPERTIES
// --------------------------------------------------

@mixin mask($arguments) {
  -webkit-mask: $arguments;
          mask: $arguments;
}
@mixin box_scale($scale) {
    -webkit-transform: scale($scale);  
      -ms-transform: scale($scale); 
          transform: scale($scale); 
}
// Single side border-radius
@mixin border-top-radius($radius) {
  border-top-right-radius: $radius;
   border-top-left-radius: $radius;
}
@mixin border-right-radius($radius) {
  border-bottom-right-radius: $radius;
     border-top-right-radius: $radius;
}
@mixin border-bottom-radius($radius) {
  border-bottom-right-radius: $radius;
   border-bottom-left-radius: $radius;
}
@mixin border-left-radius($radius) {
  border-bottom-left-radius: $radius;
     border-top-left-radius: $radius;
}
@mixin border-radius($radius) {
	 border-radius: $radius;
   -webkit-border-radius:$radius;
   -moz-border-radius: $radius;
}
// Drop shadows
@mixin box-shadow($shadow) {
  -webkit-box-shadow: $shadow; // iOS <4@mixin 3 & Android <4@mixin 1
          box-shadow: $shadow;
}

@mixin animation($properties) {
  -webkit-animation: $properties;
     -moz-animation: $properties;
       -o-animation: $properties;
          animation: $properties;
}

// Transitions
@mixin transition($transition) {
  -webkit-transition: $transition;
          transition: $transition;
}
@mixin transition-property($transition-property) {
  -webkit-transition-property: $transition-property;
          transition-property: $transition-property;
}
@mixin transition-delay($transition-delay) {
  -webkit-transition-delay: $transition-delay;
          transition-delay: $transition-delay;
}
@mixin transition-duration($transition-duration) {
  -webkit-transition-duration: $transition-duration;
          transition-duration: $transition-duration;
}
@mixin transition-transform($transition) {
  -webkit-transition: -webkit-transform $transition;
     -moz-transition: -moz-transform $transition;
       -o-transition: -o-transform $transition;
          transition: transform $transition;
}

// Transformations
@mixin rotate($degrees) {
  -webkit-transform: rotate($degrees);
      -ms-transform: rotate($degrees); // IE9+
          transform: rotate($degrees);
}
@mixin scale($ratio) {
  -webkit-transform: scale($ratio);
      -ms-transform: scale($ratio); // IE9+
          transform: scale($ratio);
}
@mixin translate($x, $y) {
  -webkit-transform: translate($x, $y);
      -ms-transform: translate($x, $y); // IE9+
          transform: translate($x, $y);
}
@mixin translateY($y) {
  -webkit-transform: translateY($y);
      -ms-transform: translateY($y); // IE9+
          transform: translateY($y);
}
@mixin translateX($x) {
  -webkit-transform: translateX($x);
      -ms-transform: translateX($x); // IE9+
          transform: translateX($x);
}
@mixin skew($x,$y) {
  -webkit-transform: skew($x, $y);
      -ms-transform: skewX($x) skewY($y); // See https://github@mixin com/twbs/bootstrap/issues/4885; IE9+
          transform: skew($x, $y);
}
@mixin translate3d($x,$y,$z) {
  -webkit-transform: translate3d($x, $y, $z);
          transform: translate3d($x, $y, $z);
}

@mixin rotateX($degrees) {
  -webkit-transform: rotateX($degrees);
      -ms-transform: rotateX($degrees); // IE9+
          transform: rotateX($degrees);
}
@mixin rotateY($degrees) {
  -webkit-transform: rotateY($degrees);
      -ms-transform: rotateY($degrees); // IE9+
          transform: rotateY($degrees);
}
@mixin perspective($perspective) {
  -webkit-perspective: $perspective;
     -moz-perspective: $perspective;
          perspective: $perspective;
}
@mixin perspective-origin($perspective) {
  -webkit-perspective-origin: $perspective;
     -moz-perspective-origin: $perspective;
          perspective-origin: $perspective;
}
@mixin transform-origin($origin){
  -webkit-transform-origin: $origin;
     -moz-transform-origin: $origin;
          transform-origin: $origin;
}
@mixin transform-style($style){
  -webkit-transform-style: $style;
    -moz-transform-style: $style;
      transform-style: $style;
}

// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms@mixin 
// Default value is `visible`, but can be changed to `hidden`
// See git pull https://github@mixin com/dannykeane/bootstrap@mixin git backface-visibility for examples
@mixin backface-visibility($visibility){
  -webkit-backface-visibility: $visibility;
     -moz-backface-visibility: $visibility;
          backface-visibility: $visibility;
}

// Background clip
@mixin background-clip($clip: border-box) {
  -webkit-background-clip: $clip;
     -moz-background-clip: $clip;
          background-clip: $clip;
}

// Box sizing
@mixin box-sizing($boxmodel) {
  -webkit-box-sizing: $boxmodel;
     -moz-box-sizing: $boxmodel;
          box-sizing: $boxmodel;
}

// 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+
       -o-user-select: $select;
          user-select: $select;
}

// Resize anything
@mixin resizable($direction) {
  resize: $direction; // Options: horizontal, vertical, both
  overflow: auto; // Safari fix
}


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