Created
October 6, 2011 22:46
-
-
Save swider/1268926 to your computer and use it in GitHub Desktop.
LESS Rotate Mixin for IE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.rotate(@val) { | |
-moz-transform: rotate(@val); /* FF3.5+ */ | |
-o-transform: rotate(@val); /* Opera 10.5 */ | |
-webkit-transform: rotate(@val); /* Saf3.1+, Chrome */ | |
-ms-transform: rotate(@val); /* IE9 */ | |
transform: rotate(@val); | |
/* IE6-IE8 */ | |
@radians: ~`parseInt("@{val}") * Math.PI * 2 / 360`; | |
@costheta: ~`Math.cos("@{radians}")`; | |
@sintheta: ~`Math.sin("@{radians}")`; | |
@negsintheta: ~`"@{sintheta}" * -1`; | |
filter: ~"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=@{costheta}, M12=@{negsintheta}, M21=@{sintheta}, M22=@{costheta})"; | |
zoom: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added a position fix less to your gist :) Thanks for the gist. It was my first way to the solution.
https://gist.github.com/dasmurphy/c39bc72ff51c21889f78