我使用 SCSS 的时间并不长,所以我不明白为什么我会在下面的示例中遇到错误。它在 Codepen 中运行良好,但是当我将它放入我的 meteor 元素中时,出现错误。
.hover {
&:extend(.post-module:hover all)
.post-content {
.description {
display: block !important;
height: auto !important;
opacity: 1 !important;
}
}
}
我在使用 SCSS Validator 时收到的错误如下:
Parsing Errors .hover:extend(.post-module:hover all) .post-content .description { Expected RPAREN at line 1, col 15.
我怎么漏掉了右括号?我就是不明白。
最佳答案
你只是在 &:extend(.post-module:hover all)
之后少了一个分号:
.hover {
&:extend(.post-module:hover all);
.post-content {
.description {
display: block !important;
height: auto !important;
opacity: 1 !important;
}
}
}
关于css - SCSS 符号使用错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50110225/