S
S
Sergey Valitov2015-03-31 16:06:07
css
Sergey Valitov, 2015-03-31 16:06:07

How do I deal with LESS?

Hello! I have this code:

transition: top 200ms linear, opacity 200ms linear;
-moz-transition: top 200ms linear, opacity 200ms linear;
-webkit-transition: top 200ms linear, opacity 200ms linear;

In LESS I do the following:
.transition(@transition) {
    transition: @transition;
    -moz-transition: @transition;
    -webkit-transition: @transition;
}

But here's the problem.. when I enter .transition(top 200ms linear, opacity 200ms linear), i.e. change the transparency and height) - then the LESS compilation error pops up. I hear it's a comma. As if the second parameter is set .. Maybe someone came across? I tried to isolate the parameter in quotes, it does not work ..

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Egor Fedosenko, 2015-03-31
@serejatoje

Faced, faced :)
Write:
Similarly for calc() it works, for example
And if you do it with prefixes, then add -ms- for IE 9 :)

M
Mikhail Osher, 2015-03-31
@miraage

I strongly recommend to abandon such mixins in favor of Autoprefixer .

O
OnYourLips, 2015-03-31
@OnYourLips

transition: top 200ms linear, opacity 200ms linear;

Isn't this code in less enough?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question