-3

I started working with compass today. I have created a project using sass (that's atleast what I entered in the cmd).

It made my project, all good. All files are good etc, made them .sass extensions.

File Structure: http://prntscr.com/9m2i7s

But now (here comes the problem), when I try to enter in some sass code, it's giving me an error: http://prntscr.com/9m2isq.

I have already found out what the problem is. The project thinks I'm using scss (where the syntax is without the ';'s and '{ }'s.

I don't mind working with scss instead of sass, but I find it weird. Because it made sass files for me etc.. and now it's wanting me to use scss.

Does anyone know how I would maybe be able to use sass instead of scss?

Kind Regards!

peer
  • 1,001
  • 4
  • 13
  • 29

1 Answers1

1

Your file extensions should be .scss for SASS, not .sass. Chances are your precompiler is choking because it don't know what format you are feeding it.

Korgrue
  • 3,430
  • 1
  • 13
  • 20
  • I see, but then why did compass made those .sass files? – peer Jan 04 '16 at 19:00
  • It is called SASS (Syntactically Awesome Style Sheets), but its extension is .SCSS (for Sassy CSS). SASS as an extension is much older and is used for the "indented" style sheets (they wont compile unless specifically built as a true SASS formatted document. For all else, use SCSS. – Korgrue Jan 04 '16 at 19:03
  • I see, well it's working now. Thanks for your help! One more thing, there's a comment before my sass code, now the compiler gives me an error.. but it still compiles the sass code. Screen.scss: http://prntscr.com/9m2nh7 Error: http://prntscr.com/9m2nmg – peer Jan 04 '16 at 19:05
  • That's not the proper way to do SASS style sheet imports. First, don't comment out the imports in your SCSS unless you dont plan to use them. If you are using partials (ie. _header.scss) then you simply import the partials using the following in the top of your main SCSS doc. Make sure the partial name uses an underscore, but DO NOT include the underscore in the import statement. The underscore just tells the precompiler that the css is a partial. If you had a scss doc named `foo` that you want to import into your main SCSS doc, name the file `_foo.scss` & import with: `@import "foo.scss";` – Korgrue Jan 04 '16 at 19:11
  • They are proper with the library I'm using. – peer Jan 04 '16 at 19:26
  • Did you give this a read perchance? http://sass-lang.com/documentation/file.SASS_REFERENCE.html#import – Korgrue Jan 04 '16 at 19:29