Conditional Imports in Less

2019-09-03 12:39发布

问题:

I've tried two ways of doing optional imports but neither seems to be working. Is this possible as of less 2.6.0?

@useRTL: true;

& when (@useRTL = true) {
    @import "bi-app/bi-app-rtl.less";
}

@useRTLpath: "bi-app/bi-app-rtl.less";
@import (optional) "@{useRTLpath}";
标签: less