Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Sass color variables return invalid css error.

I am working on project 4 in front-end development and every time I declare a color variable it returns an error. I've had errors in terminal/console and scout.

If I write: $white: #fff; I get: Invalid CSS after "$white": expected 1 selector or at-rule, was ": #fff;" _variables.scss

I'm not sure what I'm doing wrong

Can you post the whole file that this is in?

2 Answers

Are you using Sass or Sassy CSS? The syntax is different. scss is Sassy CSS.

I think I figured it out. I may have had a corrupt file because I made a new file and copied and pasted the exact contents and it started to work. Thank you for the help!