Closed xiamu14 closed 7 years ago
编译前:颜色值是 #ccc @support-ie-version: 8; @use-autoprefixer: false;
.comment:after { .triangle(top left, #cccccc, 10px, corner); } 编译后:颜色值是 #666 .comment:after { position: absolute; width: 0; height: 0; border: #666666 solid 10px; border-bottom-color: transparent; border-right-color: transparent; }
这个 mixin 的调用方式是 .triangle(@direction, @size, @color, @origin),你 @size 和 @color 写反了。 参考:http://ecomfe.github.io/est/#triangle-1
.triangle(@direction, @size, @color, @origin)
@size
@color
谢谢,我在estFiddle里调试的,没仔细看文档的api介绍。
编译前:颜色值是 #ccc @support-ie-version: 8; @use-autoprefixer: false;
.comment:after { .triangle(top left, #cccccc, 10px, corner); } 编译后:颜色值是 #666 .comment:after { position: absolute; width: 0; height: 0; border: #666666 solid 10px; border-bottom-color: transparent; border-right-color: transparent; }