如何将以下条件转换为 LESS?
.mixin(@width) {
width: (!@width ? auto : @width);
}
结果应该是这样的:
[no value is passed]
LESS: .mixin();
CSS: width: auto;
[value is passed]
LESS: .mixin(200px);
CSS: width: 200px;
如何将以下条件转换为 LESS?
.mixin(@width) {
width: (!@width ? auto : @width);
}
结果应该是这样的:
[no value is passed]
LESS: .mixin();
CSS: width: auto;
[value is passed]
LESS: .mixin(200px);
CSS: width: 200px;