add transform mixin, refactor rotation, scale and translate to use the new mixin

This commit is contained in:
Dmitry Fadeyev 2012-12-25 22:36:18 +00:00
parent 0ca86e6bfb
commit 2f00576083

View file

@ -88,18 +88,18 @@
-o-transition-duration: @duration; -o-transition-duration: @duration;
transition-duration: @duration; transition-duration: @duration;
} }
.transform() {
-webkit-transform: @arguments;
-moz-transform: @arguments;
-o-transform: @arguments;
-ms-transform: @arguments;
transform: @arguments;
}
.rotation(@deg:5deg){ .rotation(@deg:5deg){
-webkit-transform: rotate(@deg); .transform(rotate(@deg));
-moz-transform: rotate(@deg);
-o-transform: rotate(@deg);
-ms-transform: rotate(@deg);
transform: rotate(@deg);
} }
.scale(@ratio:1.5){ .scale(@ratio:1.5){
-webkit-transform:scale(@ratio); .transform(scale(@deg));
-moz-transform:scale(@ratio);
-o-transform: scale(@ratio);
transform:scale(@ratio);
} }
.transition(@duration:0.2s, @ease:ease-out) { .transition(@duration:0.2s, @ease:ease-out) {
-webkit-transition: all @duration @ease; -webkit-transition: all @duration @ease;
@ -150,10 +150,6 @@
column-rule-width: @columnRuleWidth; column-rule-width: @columnRuleWidth;
} }
.translate(@x:0, @y:0) { .translate(@x:0, @y:0) {
-moz-transform: translate(@x, @y); .transform(translate(@x, @y));
-webkit-transform: translate(@x, @y);
-o-transform: translate(@x, @y);
-ms-transform: translate(@x, @y);
transform: translate(@x, @y);
} }