Skip to content

Instantly share code, notes, and snippets.

@jlong
Created October 9, 2012 16:47
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jlong/3859980 to your computer and use it in GitHub Desktop.
Save jlong/3859980 to your computer and use it in GitHub Desktop.
//
// Sass rotation mixin for IE6+
//
@mixin ms-rotate($degrees) {
@if (not unitless($degrees)) { $degrees: $degrees / 1deg }
$deg2rad: pi() * 2 / 360;
$radians: $degrees * $deg2rad;
$costheta: cos($radians);
$sintheta: sin($radians);
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=#{$costheta}, M12=#{-$sintheta}, M21=#{$sintheta}, M22=#{$costheta});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment