SASS Invalid css error

前端 未结 2 2048
一个人的身影
一个人的身影 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: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;
    }
    

提交回复
热议问题