C.Ronaldo C.Ronaldo - 5 months ago 41
Sass (Sass) Question

(Koala) Can't compile variables in Sass

It's my first time using Koala.
Everything works fine so far, but when I want to use variables it starts giving me errors. I really don't know what I'am doing wrong, cause I followed all steps.

For example:

$test: #00000;
would give me error (doesn't matter in which .scss file I put it in.

I have uploaded a screenshot of my structure and the error.

enter image description here


The actual problem with the code is that you supplied 5 digits for the value of a hexadecimal value.

You should either use 3 or 6 and not 5

$test: #000000; // not #00000

The reason why it worked by not importing _variables.scss is because it is a partial file and by not importing it, it never gets compiled and so it basically doesn't evaluate the line causing the error. That line is just ignored.