B
B
bro-dev2015-08-30 09:27:06
Less
bro-dev, 2015-08-30 09:27:06

How to concatenate strings in Less?

This

.m(@width,@styles) {
    @media (max-width: @width+'px') {
            @styles();
    }
}

gives this
@media (max-width:255 'px')
but it should
@media (max-width:255px)
and even not this
@media (max-width:255 px)
Why are there quotes in the first case? Why is there a space in 3rd case? how to make the most common concatenation without spaces and quotes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2015-08-30
@xPomaHx

stackoverflow.com/questions/14384803/negate-a-nume
...

@width: 144px;

 a{
  width: @width / 3.14 
}

checkout _ _

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question