css - 编译 SASS 时出现错误 expected new line

标签 css sass

我遇到的问题是我的 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/

相关文章:

css - SASS 观察器观察所有文件夹,编译为一个 CSS

html - Angular 应用程序中的 NgbTooltip 位置

html - IE 6/7 - 标题消失了?

javascript - css 过渡不是通过在同一函数中添加类来触发的

html - Windows 而非 macOS 上的水平正文溢出

css - 在 React App 中使用 CSS/SCSS 模块的便捷方式

twitter-bootstrap - 如何在 angular 2 中使用 bootstrap 4?

css - 使用 Flexbox 的 100% 高度容器的可滚动卡片

html - div中的图像要相等

css - 在 scss 导入上设置 `font-display: swap`