84

I've just been following the Sass tutorial. For some reason though the Sass file is not correctly generating the css. The terminal says the css is invalid but I'm pretty sure it's not. I've tried changing it too just in case there was a problem...

What have I done wrong?

Sass Version: Sass 3.1.10

Error message:

error sass/test.sass (Line 3: Invalid CSS after "80%": 
expected expression (e.g. 1px, bold), was ";")

.sass file contents:

/* style.scss */
#navbar {
  width: 80%;
  height: 23px;
}
Blazemonger
  • 90,923
  • 26
  • 142
  • 180
Tom R
  • 1,783
  • 2
  • 14
  • 14
  • 9
    Ahaaa! The problem was caused by using the wrong file extension! It's **.scss** not **.sass** – Tom R Oct 12 '11 at 20:16

2 Answers2

157

Based on your error message (error sass/test.sass) I can tell you're using the .sass extension for a Scss file. Change your file name to style.scss.

Sass and Scss use two different and incompatible syntaxes.

user229044
  • 232,980
  • 40
  • 330
  • 338
12

Try either:

/* style.scss */
#navbar {
  width: 80%;
  height: 23px;
}

Or:

/* style.sass */
#navbar 
  width: 80%
  height: 23px

Note the difference in file extension and syntax.

Omega
  • 2,998
  • 2
  • 16
  • 19
lincolnge
  • 1,037
  • 14
  • 19