I simply have the code
@def WIDTH 50 // will be reused
// ...
width: @def WIDTH px // incorrect space between
I believe CSS doesn't allow the space between # and px which makes this code wrong. But I haven't found a string concat function. Is there a way to do this?
I'm aware I can @def WIDTH to be 50px, that will break its reuse.
正确的封闭解决这个问题是mult
由单位。
width: mult(1px, WIDTH);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.