Skip to content

Commit

Permalink
(less) Merge pull request twbs#10025 from barryvdh/patch-2
Browse files Browse the repository at this point in the history
Add missing methods (rotateX/Y, perspective(-origin) and transform-origin)
  • Loading branch information
mdo committed Sep 6, 2013
2 parents a189806 + 39d6204 commit 4dd06b0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,33 @@
transform: translate3d(@x, @y, @z);
}

.rotateX(@degrees) {
-webkit-transform: rotateX(@degrees);
-ms-transform: rotateX(@degrees); // IE9+
transform: rotateX(@degrees);
}
.rotateY(@degrees) {
-webkit-transform: rotateY(@degrees);
-ms-transform: rotateY(@degrees); // IE9+
transform: rotateY(@degrees);
}
.perspective(@perspective) {
-webkit-perspective: @perspective;
-moz-perspective: @perspective;
perspective: @perspective;
}
.perspective-origin(@perspective) {
-webkit-perspective-origin: @perspective;
-moz-perspective-origin: @perspective;
perspective-origin: @perspective;
}
.transform-origin(@origin){
-webkit-transform-origin: @origin;
-moz-transform-origin: @origin;
transform-origin: @origin;
}


// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
Expand Down

0 comments on commit 4dd06b0

Please sign in to comment.