I've started using LESS for CSS lately and was wondering if my method is the correct way to target multiple vendor prefixes by creating my own LESS "mixin" (I think)?
.transition (@transition: 1s) {
transition: @transition;
-webkit-transition: @transition;
-moz-transition: @transition;
}
So if I were for example to have a .btn class and call .transition (which works)
.btn:hover {
color: red;
.transition(@transition: 1s ease-in);
}
And for animations.
@animate-fadein: fadeIn 1.7s linear;
.animation (@animation: fadeIn .2s linear) {
animation: @animation;
-webkit-animation: @animation;
-moz-animation: @animation;
-o-animation: @animation;
}
.btn
.btn {
@animation(@animation: fadeIn .2s linear);
}
This method works by the way. I'm just curious. Is my method over-complicating things and or am I just reinventing the wheel?