Skip to content

Instantly share code, notes, and snippets.

@pospi
Created August 18, 2014 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pospi/c4c58edbdeac77915f0e to your computer and use it in GitHub Desktop.
Save pospi/c4c58edbdeac77915f0e to your computer and use it in GitHub Desktop.
IE6+ compatible rotation mixin using matrices
.rotate-ie(@degrees) {
-webkit-transform: rotate(@degrees);
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
@cos: cos(@degrees);
@sin: sin(@degrees);
@nl: `"\n"`; // Newline
filter: ~"progid:DXImageTransform.Microsoft.Matrix(@{nl} M11=@{cos},@{nl} M12=-@{sin},@{nl} M21=@{sin},@{nl} M22=@{cos},@{nl} sizingMethod='auto expand'@{nl} )";
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(@{nl} M11=@{cos},@{nl} M12=-@{sin},@{nl} M21=@{sin},@{nl} M22=@{cos},@{nl} sizingMethod='auto expand'@{nl} )";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment