diff --git a/build/_includes/tests/rotated-flipped-inside-anchor.html b/build/_includes/tests/rotated-flipped-inside-anchor.html
new file mode 100644
index 000000000..df11b37b4
--- /dev/null
+++ b/build/_includes/tests/rotated-flipped-inside-anchor.html
@@ -0,0 +1,6 @@
+ normal
+ icon-rotate-90
+ icon-rotate-180
+ icon-rotate-270
+ icon-flip-horizontal
+ icon-flip-vertical
diff --git a/build/_includes/tests/rotated-flipped-inside-btn.html b/build/_includes/tests/rotated-flipped-inside-btn.html
new file mode 100644
index 000000000..c8c9993fd
--- /dev/null
+++ b/build/_includes/tests/rotated-flipped-inside-btn.html
@@ -0,0 +1,6 @@
+ normal
+ icon-rotate-90
+ icon-rotate-180
+ icon-rotate-270
+ icon-flip-horizontal
+ icon-flip-vertical
diff --git a/build/assets/font-awesome/less/extras.less b/build/assets/font-awesome/less/extras.less
index 3d16eb6f3..4098d3947 100644
--- a/build/assets/font-awesome/less/extras.less
+++ b/build/assets/font-awesome/less/extras.less
@@ -35,7 +35,7 @@
}
/* Icon rotations and mirroring */
-.icon-rotate-90:before{
+.icon-rotate-90:before {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
@@ -44,7 +44,7 @@
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
}
-.icon-rotate-180:before{
+.icon-rotate-180:before {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
@@ -53,7 +53,7 @@
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
-.icon-rotate-270:before{
+.icon-rotate-270:before {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
@@ -76,4 +76,11 @@
-ms-transform: scale(1, -1);
-o-transform: scale(1, -1);
transform: scale(1, -1);
-}
\ No newline at end of file
+}
+
+/* ensure rotation occurs inside anchor tags */
+a {
+ .icon-rotate-90, .icon-rotate-180, .icon-rotate-270, .icon-flip-horizontal, .icon-flip-vertical {
+ &:before { display: inline-block; }
+ }
+}
diff --git a/build/test.html b/build/test.html
index 1668098df..bff965a41 100644
--- a/build/test.html
+++ b/build/test.html
@@ -602,5 +602,19 @@ relative_path: ../
{% include tests/rotated-flipped.html %}
-
+
+