.px2px(@size, @px){
@size: round(@px / 2) * 1px;
[data-dpr="2"] & {
@size: @px * 1px;
}
// for mx3
[data-dpr="2.5"] & {
@size: round(@px * 2.5 / 2) * 1px;
}
// for 小米note
[data-dpr="2.75"] & {
@size: round(@px * 2.75 / 2) * 1px;
}
[data-dpr="3"] & {
@size: round(@px / 2 * 3) * 1px
}
// for 三星note4
[data-dpr="4"] & {
@size: @px * 2px;
}
}
当使用gulp-less编译后,
错误提示:
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser 92 | .header-right{
93 | display: inline-block;
> 94 | .px2px(font-size,36);
| ^
95 | line-height:88/@r;
96 | text-align: center;
请问前面的这个.px2px的方法该如何修改。或者说在gulp-less里是否有格外的配置参数。
应该是 loader 配置的问题 贴出来看一下