SASS unexpected token

Answered

I have been trying for a few hours now to use SASS on PHPStorm. Installed it using Ruby and have everything on the latest versions.

I can't do anything without an "unexpected token" or "end of line expected" error. What am I missing?



 

0
2 comments

Hi there,

It would be great to see whole editor window (including the file icon) -- details matter.

But generally speaking: there are 2 syntaxes -- Sass and SCSS. It's quite possible that you are using wrong syntax (SCSS) for your file extension (*.sass).

 

From http://sass-lang.com/guide . Same code in different syntaxes:

Sass:

$font-stack:    Helvetica, sans-serif
$primary-color: #333

body
  font: 100% $font-stack
  color: $primary-color

SCSS:

$font-stack:    Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}

 

1
Avatar
Permanently deleted user

You're spot on mate. That's where I've gone wrong.

As soon as I changed the file to SCSS all my code worked. Thanks for your help.

0

Please sign in to leave a comment.