Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get started with Compass/Sass on Mac – Invalid CSS error?

I am trying to get started with Compass/Sass on my Mac. After running sudo gem install compass, I have set up a project with a single main.scss file and I use compass watch to have the file automatically compiled to CSS.

main.scss looks like this:

@import "compass/css3/border-radius"

div .blah .baz {
  @include border-radius(4px, 4px);
  font-weight: bold; 
}

Seems like nothing complicated, right? Well, every time I save the file, I get an error like this:

>>> Change detected to: /Users/mikl/Sites/ddk7/profiles/blaahval/themes/kaskelot/./scss/main.scss
    error ./scss/main.scss (Line 3: Invalid CSS after ".../border-radius"": expected selector or at-rule, was "$blue: #3bbfce;")
overwrite ./css/main.css

Is there something wrong with my SCSS syntax, or just compass just have very poor error messages?

like image 958
mikl Avatar asked Feb 08 '11 22:02

mikl


1 Answers

As @jnpcl said, a semi-colon would be good. However, if that was the issue it should throw an error directly related to that.

This seems like a stretch, but did you copy and paste that line? Perhaps there is character weirdness happening?

like image 118
Theresa Summa Avatar answered Sep 19 '22 06:09

Theresa Summa