我遇到的问题是我的 SASS 无法编译并且显示相同的错误:Expected NewLine
#topper, h3 {
text-align: center;
text-decoration:underline;
}
.list-group{
.active{
text-decoration: underline;
font-weight:bold
}
}
显示错误。什么都试过了,甚至删除左括号并将其放在新行中
╷
1 │ #topper, h3 {
│ ^
╵
home.sass 1:13 root stylesheet
最佳答案
根据 Sass-lang.com以及@Nit 的评论你选择了错误的编译选项。
这是 SCSS
@mixin button-base() {
@include typography(button);
@include ripple-surface;
@include ripple-radius-bounded;
display: inline-flex;
position: relative;
height: $button-height;
border: none;
vertical-align: middle;
&:hover { cursor: pointer; }
&:disabled {
color: $mdc-button-disabled-ink-color;
cursor: default;
pointer-events: none;
}
}
在 SASS 中也是如此
@mixin button-base()
@include typography(button)
@include ripple-surface
@include ripple-radius-bounded
display: inline-flex
position: relative
height: $button-height
border: none
vertical-align: middle
&:hover
cursor: pointer
&:disabled
color: $mdc-button-disabled-ink-color
cursor: default
pointer-events: none
关于css - 编译 SASS 时出现错误 expected new line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56858150/