Home > Blockchain >  Sass invalid css error on compile in live sass compiler
Sass invalid css error on compile in live sass compiler

Time:10-23

I just started writing sass and on my first lines

body{
    background-color: #272727;
    color: white;
}

I get an error of

--------------------
Change Detected...
index.sass
--------------------
Compilation Error
Error: Invalid CSS after "body{": expected "}", was "{"
        on line 1 of sass/c:\Users\user\desktop\Scripts\cryptoChess\src\Assets\Style\index.sass
>> body{ {

   -----^

--------------------

I am using the live sass compiler extension on vs code. Anyone know how to fix this?

CodePudding user response:

It looks like you're using the .sass file extension for index.sass for a scss file. You need to change it to use the scss file extension for it to compile.

See also:

Sass Invalid CSS Error: "expected expression"

  • Related