Font-Awesome/less/rotated-flipped.less
2015-06-28 19:12:03 -07:00

39 lines
1023 B
Plaintext

// Rotated & 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}";
.@{rotation-selector} when (mod(@i, 90) = 0) {
filter: none;
}
// iterate
.calculateIEFixes((@i - 1));
}
.calculateIEFixes(359);
}