Concatenate string and var less css

后端 未结 6 1490
滥情空心
滥情空心 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:25

    In case any late-comers find this thread:

    There is a built-in function for this:

    unit(@dimension, [@unit: ""]);
    

    So font-size: unit(@size, px); should result in font-size: 12px. I tested it.

    http://lesscss.org/#reference

提交回复
热议问题