Skip to content
Browse files

Addded transform-origin to transforms

  • Loading branch information...
1 parent 2da2b19 commit 0943d14f5d68585f1e5dacb6da45fe2d93ac35dd Phil LaPier committed Aug 19, 2011
Showing with 14 additions and 1 deletion.
  1. +11 −0 app/assets/stylesheets/css3/_transform.scss
  2. +3 −1 readme.md
View
11 app/assets/stylesheets/css3/_transform.scss
@@ -6,3 +6,14 @@
-o-transform: $property;
transform: $property;
}
+
+@mixin transform-origin($axes: 50%) {
+// x-axis - left | center | right | length | %
+// y-axis - top | center | bottom | length | %
+// z-axis - length
+ -webkit-transform-origin: $axes;
+ -moz-transform-origin: $axes;
+ -ms-transform-origin: $axes;
+ -o-transform-origin: $axes;
+ transform-origin: $axes;
+}
View
4 readme.md
@@ -187,9 +187,10 @@ Takes up to 10 gradients. Position and shape are required.
@include radial-gradient(50% 50%, circle cover, #eee 10%, #1e5799 30%, #efefef);
-###Transform
+###Transform & Transform-origin
@include transform(translateY(50px));
+ @include transform-origin(center top);
###Transitions
@@ -355,6 +356,7 @@ Create beautiful buttons by defining a style and color argument; using a single
@ linear-gradient(*args)
@ radial-gradient(*args)
@ transform(*args)
+ @ transform-origin(*args)
transition
@ transition(*args)

0 comments on commit 0943d14

Please sign in to comment.
Something went wrong with that request. Please try again.