tags:

views:

31

answers:

1

I am using SASS and it has been working, but now I get this...

Syntax error on line 1: Properties aren't allowed at the root of a document.

My file is using variables in the SASS format.

$blue-muted: #222244
$red-muted: #442222
$green-muted: #224422

When I remove the variables (and replace the values with the actual colors), it compiles fine. What is wrong here?

EDIT: My confusion stemmed from having installed HAML 3.0, but getting behavior consistent with an early 2.0 version. It turned out that I had a SASS command line tool from an old version in my path and it was running instead of the current version.

+2  A: 

Looks like you are using the new SCSS syntax which should look like:

$blue-muted: #222244;

if you want to use sass, the colors should be declared as:

!blue-muted = #222244

Jed Schneider
You are right - I also had to remove the dash, since they are not allowed in that syntax. Thanks.
Jim Blake
you're right it should be !blue_muted -blush-
Jed Schneider
edited question because I was unknowingly running an older version than I thought.
Jim Blake