Concatenate string and var less css

后端 未结 6 1483
滥情空心
滥情空心 2020-12-09 10:01

Can anyone please tell me how to concatenate a var and a string in LESS so I don\'t have the space between them?

I have the following code:

.text(@si         


        
6条回答
  •  时光取名叫无心
    2020-12-09 10:36

    In a case you need to use it in combination with CSS function (eg. calc), here is one way:

    @width: 12;
    width: %(~"calc(33%% - %dpx)", @width);
    

    Outputs:

    width: calc(33% - 12px);
    

提交回复
热议问题