SASS Invalid css error

前端 未结 2 2047
一个人的身影
一个人的身影 2021-01-16 08:37

I just started with sass and installed prepros. I tried to compile an .scss file and got an error:

Syntax error: Invalid CSS after \" color: \": expected exp

相关标签:
2条回答
  • 2021-01-16 09:09

    SCSS uses $ to denote variables so it should be background-color: $blue;

    0 讨论(0)
  • 2021-01-16 09:11

    It looks like your syntax is wrong. In Sass, @ is for things like imports, media directives, partials (includes) and extends.

    If you want to define a specific value for blue, and then reuse it, then the syntax is something like this:

    $blue: #3333FF;
    
    a {
        font-weight: bold;
        color: $blue;
    }
    
    0 讨论(0)
提交回复
热议问题