Menu icon Foundation
Sass syntax error on Rails

I'm having a sass syntax error on my project. Here's the errors

Invalid CSS after "...odules, $name) ": expected "}", was "!global;"

&

app/assets/stylesheets/foundation_and_overrides.scss:13

I don't know what to do, I've update my gemfile and install the latest.
Using foundation-rails 5.4.4.0
Using sass 3.2.19

I'm having a sass syntax error on my project. Here's the errors

Invalid CSS after "...odules, $name) ": expected "}", was "!global;"

&

app/assets/stylesheets/foundation_and_overrides.scss:13

I don't know what to do, I've update my gemfile and install the latest.
Using foundation-rails 5.4.4.0
Using sass 3.2.19

Foundation Sass

I'm having a sass syntax error on my project. Here's the errors

Invalid CSS after "...odules, $name) ": expected "}", was "!global;"

&

app/assets/stylesheets/foundation_and_overrides.scss:13

I don't know what to do, I've update my gemfile and install the latest.
Using foundation-rails 5.4.4.0
Using sass 3.2.19

I'm having a sass syntax error on my project. Here's the errors

Invalid CSS after "...odules, $name) ": expected "}", was "!global;"

&

app/assets/stylesheets/foundation_and_overrides.scss:13

I don't know what to do, I've update my gemfile and install the latest.
Using foundation-rails 5.4.4.0
Using sass 3.2.19

Neil Gardose almost 5 years ago

I found a solution but I don't know if this is the right one but it works anyway,
I checked the path of my foundation gem by using bundle command
"bundle show foundation-rails"
Go to the path and find "_function.scss"
Remove the "-global" on line 13.

Run server and no Sass::SyntaxError occur.

saqihel almost 5 years ago

thanks for the information.

Raymond Wright almost 5 years ago

I believe it is because foundation is now using sass 3.4. There is a comment about using libsass with 5.4. i updated sass and then used compass and no errors. i tried taking out the global but then you just get a bunch more errors.

Here is the comment from zurb "Foundation now supports Sass 3.4. Libsass does not have Sass 3.4 support right now. If you are creating a Libsass project, you can use Sass 3.2 still. If you want to dig into the code and make the needed changes, check this out: Sass 3.4 Compatibility".

Marco Colli almost 5 years ago

I have the exact same problem :(

Nick Savage almost 5 years ago

I had this problem plague me for the better half of the day yesterday and here's how I fixed it:

-Use the command line to navigate to your application's folder
-"gem uninstall sass" Make sure to select the old, outdated 3.2.19 if you have multiple versions
-"gem install sass" To install the latest 3.4.4 which is compatible with the newest Foundation
-Check your Gemlock file and change your sass lock from 3.2.19 to 3.4.4

These are general directions, If you need to support multiple versions of sass or the like then alter them to fit your needs but this should outline your problem.

Raymond Wright almost 5 years ago

libsass isn't compatible with 3.4.4 yet so scout and libsass will still throw errors for a while, compass works fine after the sass update.

Nick Savage almost 5 years ago

Where does it even imply he's using libsass?

Raymond Wright almost 5 years ago

NIck,
He's using F5.4.4 which uses sass 3.4.4. libsass does not support sass 3.4.4 yet. so it will kick those errors, as well as scout, which i'm guessing uses libsass. If the OP is not using libsass/scout then hopefully he replies back with the compiler he is using. but i'm guessing it's libsass/scout.

Nick Savage almost 5 years ago

I'm currently using the same set up and don't see any errors in my log file. I also wasn't aware that Foundation 5 uses libsass by default

Raymond Wright almost 5 years ago

foundation doesn't. the compiler is libsass. it compiles the scss to css and so forth. Foundation is compatible with libsass except for the !global. something new in sass 3.4.4. The link i provided from zurb has info on fixing it for users using libsass.

Raymond Wright almost 5 years ago

have you updated to Foundation 5.4.4?

Karl Ward almost 5 years ago

I had this problem, which was solved by updating sass:
npm update
sudo gem update sass