The Less is wrong with syntax unit

时间:2016-05-11 11:32:35

标签: less

I have the following LESS:

padding-left: unit(@padding-min*@per + 25)px;
@padding-min*@per = 14vw 

It's compiling to padding-left: 39 px.

How can I remove the space between 39 and px?

1 个答案:

答案 0 :(得分:0)

unit() function将单位作为第二个参数。

padding-left: unit(@padding-min*@per + 25)px
//                                       ^^^

应该是

padding-left: unit(@padding-min*@per + 25, px);
//                                       ^^^^^