css - Combine browser selectors with LESS -
is possible combine -webkit, -moz, -o, , -ms selectors 1 less?
i tried doing
.transition(@t @d) { transition:@t @d; -webkit-transition:@t @d; -moz-transition:@t @d; }
but broke css file.
i want able type
.transition(whattotransition duration)
and have apply selectors.
you try putting comma between arguments.
.transition(@t, @d) { -moz-transition: @t @d @e; -webkit-transition: @t @d @e; transition: @t @d @e; }
and add argument ease , default values arguments, this:
.transition(@t: all, @d: 1s, @e: linear) { -moz-transition: @t @d @e; -webkit-transition: @t @d @e; -o-transition: @t @d @e; -ms-transition: @t @d @e; transition: @t @d @e; }
i hope want. , reorder vendor prefixed properties, put non-prefixed property @ end, , example add o
ms
, shown above.
so example. less:
.test { .transition(all, 0.5s, ease-in); }
will return css:
.test { -webkit-transition: 0.5s ease-in; -moz-transition: 0.5s ease-in; -o-transition: 0.5s ease-in; -ms-transition: 0.5s ease-in; transition: 0.5s ease-in; }
Comments
Post a Comment