// rotated and flipped icons
// -------------------------

@rotations-requiring-ie-fix:
  "flip-horizontal",
  "flip-vertical";
@rotation-selector: '';

// calculate classes and values for rotation
.calculateRotations(@i) when (@i >= 0) {
  @rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";

  .@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
    .fa-icon-rotate(@i);
  }
  .calculateRotations((@i - 1));
}
.calculateRotations(359);

// flip icons horizontal/vertical
.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
.@{fa-css-prefix}-flip-vertical   { .fa-icon-flip(1, -1, 2); }

// ie 8-9 fix
// -------------------------
// todo: check on assigning an array of selectors to the selector instead of using
//       this loop

:root  {
  .calculateIEFixes(@i) when (@i >= 0) {
    @rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";

    // check if this item needs some ie love
    .@{rotation-selector} when (mod(@i, 90) = 0) {
      filter: none;
    }
    .calculateIEFixes((@i - 1));
  }
  .calculateIEFixes(359);
}