美文网首页
Less使用混合函数报错(Error compiling les

Less使用混合函数报错(Error compiling les

作者: 苗喵秒 | 来源:发表于2019-11-07 10:03 被阅读0次

    有问题代码片段

    .test(@var:15) {
        .test-class {
            font-weight: @var;
        }
    }
    
    .test()
    

    正常代码片段

    .test(@var:15) {
        .test-class {
            font-weight: @var;
        }
    }
    
    .test();
    

    错误原因:在调用less混合(mixins)函数时结尾添加分号;

    相关文章

      网友评论

          本文标题:Less使用混合函数报错(Error compiling les

          本文链接:https://www.haomeiwen.com/subject/rpymbctx.html