Karma CSS

Flip

// Flip
// ––––––––––––––––––––––––––––––––––––––––––––––––––

// flip an element on its axis
//
// Usage:
// horizontally only:
// @include flip(true, false);
// vertically only:
// @include flip(false, true);
// horizontally and vertically:
// @include flip(true, true);
//
@mixin flip($x: false, $y: false) {
  $scaleX: 1;
  $scaleY: 1;
  @if $x {
    $scaleX: -1;
  }
  @if $y {
    $scaleY: -1;
  }
  transform: scale($scaleX, $scaleY);
}