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 Basics (retired) Variables, Mixins, and Extending Selectors Defining Variables

Ryan Hellerud
Ryan Hellerud
3,635 Points

code not working

/* Write your SCSS code below. */ $lime: #090 a{ color: $lime; }

5 Answers

Tim Rourke
Tim Rourke
12,151 Points

Ryan,

Mark's right. Try it like this:

$lime: #090;

a {
  color:$lime;
}

Also, keep in mind that Sass is processed in sequential order line by line, so when you declare a Sass variable, make sure it's preprocessed before the code you use it in.

I like to create a Sass partial just for declaring all of my color variables.

Cheers!

Ryan Hellerud
Ryan Hellerud
3,635 Points

Hi tim i followed that guide and installed the scss plugins but now when i try to save and build through sublim im getting this error: [Errno 2] No such file or directory: 'sass' [cmd: ['sass', '--update', '/Users/Jarg/Desktop/web/newscssomega/omegadesignla/scss/app.scss:/Users/Jarg/Desktop/web/newscssomega/omegadesignla/scss/app.css', '--stop-on-error', '--no-cache']] [dir: /Users/Jarg/Desktop/web/newscssomega/omegadesignla/scss] [path: /usr/bin:/bin:/usr/sbin:/sbin] [Finished]

any idea what that means?

Tim Rourke
Tim Rourke
12,151 Points

Hmm, I'm not a Sublime expert per se. Have you tried restarting Sublime altogether? Also, have you installed Sass on your system? That might be the problem.

http://sass-lang.com/install

This provides a great tutorial on several methods to install Sass.

If that doesn't help (or you've already installed Sass) tell me what you see when you type 'sass' into the Mac OS X terminal. (Go to Applications->Utilities->Terminal.app in your finder.)

Ryan,

You're missing a semi-colon after one of your declarations. Once you pop that in there you'll be good to go!

Ryan Hellerud
Ryan Hellerud
3,635 Points

thanks guys begging error haha. on a side not anyone know why my sublime text is not recognizing scss and all text shows up white instead of color labeled. makes it hard to see.

Tim Rourke
Tim Rourke
12,151 Points

You can actually tell it to render scss files with css colorization by going to:

View -> Syntax -> CSS

There are a number of addons you can install for Sublime, as well. Check out this post about .sass/.scss syntax highlighting and other Sass-support related issues:

http://sublimetexttips.com/how-to-add-sass-support-in-sublime-text/

*Edit: I misspelled 'render'. :)

Ryan Hellerud
Ryan Hellerud
3,635 Points

thanks so much Tim very helpful!

Ryan Hellerud
Ryan Hellerud
3,635 Points

Thanks Tim, I got everything up and running now. It seems like I had gone to far with the plugins for sublime lol and one of the build/save sass pluggins was throwing my computer into a hissy fit. For now its back up and running. Just learning more sass now, so i can use the benefits it offers.

also would you mind adding me on skype? Or anyone else who would like to chat about web dev and technologies can add me my alias is: jarggsx on skype

Tim Rourke
Tim Rourke
12,151 Points

Ryan,

I don't really use Skype, but you can always email me at timothy.rourke@gmail.com if you ever have questions.

Cheers!

Tim