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

Correctly using Sass

I have Scout installed to use Sass and I have it up running correctly (I think!), while I can type CSS into a .scss file and it will be compiled into a .css file, Sublime doesn't recognize the .scss type and so it no longer produces predictions/auto-fills when I'm entering code. I've taken one step forwards and one backwards ): I can see on the videos that it is recognized in Hamptons examples so is there something I am doing wrong??

8 Answers

Tim Knight
Tim Knight
28,888 Points

Nothing you're doing wrong Luke, Sublime just might now understand the .scss file extensions. You're going to want to make sure the SCSS bundle is installed in Sublime Text. One way to do this is to make sure that Package Manager is installed (see https://sublime.wbond.net/installation). Then with that installed, bring up the command palette (first option under tools) and type install (you should see Package Install) as an option... select that. Then type in SCSS and you should see a package for SCSS. Press enter on that as well. This will install the package to recognize SCSS files and give you proper syntax coloring and code completion assistance. Hope that helps!

Tim Knight
Tim Knight
28,888 Points

Yes, you're correct. With a single mistake there will likely be a compilation error from Sass so it will fail. This is normal.

Sweeeet thanks Tim shall try that now

It was all going well until I used variables? Now the whole document fails

/*******************************************
    VARIABLES
*******************************************/

$primary-color: #666;
$secondary-color: #;
$main-font:;
$compliment-font:;

No sorry I had my syntax wrong!

Tim Knight
Tim Knight
28,888 Points

What happens with variables? Make sure you have complete values in those last three variables.

Hah sorry, I figured it out, had my syntax set to 'css' instead of 'scss'. Thank you for the quick response though. Although one quick question when I make a single mistake my entire SCSS/CSS fails is this normal procedure?