Font-Awesome/less/rotated-flipped.less

41 lines
1.0 KiB
Plaintext
Raw Normal View History

// rotated and flipped icons
// -------------------------
2015-06-29 09:43:06 +08:00
@rotations-requiring-ie-fix:
"flip-horizontal",
"flip-vertical";
@rotation-selector: '';
2015-06-29 09:43:06 +08:00
// calculate classes and values for rotation
.calculateRotations(@i) when (@i >= 0) {
2015-06-29 09:43:06 +08:00
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
2015-06-29 10:12:03 +08:00
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
2015-06-29 09:43:06 +08:00
.fa-icon-rotate(@i);
}
.calculateRotations((@i - 1));
2015-06-29 09:43:06 +08:00
}
.calculateRotations(359);
// flip icons horizontal/vertical
2013-10-23 11:40:21 +08:00
.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
2015-06-29 09:43:06 +08:00
// ie 8-9 fix
// -------------------------
2015-06-29 09:43:06 +08:00
// todo: check on assigning an array of selectors to the selector instead of using
// this loop
2015-06-29 09:43:06 +08:00
:root {
.calculateIEFixes(@i) when (@i >= 0) {
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
// check if this item needs some ie love
2015-06-29 09:43:06 +08:00
.@{rotation-selector} when (mod(@i, 90) = 0) {
filter: none;
}
.calculateIEFixes((@i - 1));
2015-06-29 09:43:06 +08:00
}
.calculateIEFixes(359);
}