这是我的scss文件
@mixin important-text {
color: red;
font-size: 25px;
font-weight: bold;
border: 1px solid blue;
}
.danger {
@include: important-text;
background-color: green;
}
在我与考拉编译后,我收到一个错误,说-
Error: Invalid CSS after " @include": expected identifier, was ": important-text;"
on line 9 of C:Users
我不知道哪里出了问题。
它应该是@include mixin_name
danger {
@include important-text;
background-color: green;
}
参考
在:
中包含混音时是不必要的,并且会导致错误。
相反:
@mixin mixin-name() {...}
@include mixin-name();