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) Getting Started with Sass Nesting Selectors

For my main.css to be updated , why I must retype sass --watch main.scss:main.css every time??

Hello everyone,

I hope someone can tell me why the changes i am making are not automatically updating.

Here is my issue for 2 different scenarios :

first scenario:

  1. when both my main.scss and main.css have the same code for example:

body { background: red; }

then i type sass --watch main.scss:main:css

the cmd prompt displays >>> Sass is watching for changes. Press Ctrl-C to stop.

  1. when ever i make changes in my main.scss nothing changes in the main.css

second scenario:

  1. I first make a change in the main.scss

  2. i type sass --watch main.scss:main.css

  3. the cmd promt displays

Sass is watching for changes. Press Ctrl-C to stop. write main.css write main.css.map

  1. when i go back and click on the main.css an alert reload message pops up. then the changes gets updated in the main.css

  2. here is the issue: I have to exit and rerun sass --watch everytime i make a change in the main.scss for the main.css to be updated.

I apologize for the long message but i would appreciate it if anyone can help me out. Thanks

2 Answers

Aaron HARPT
Aaron HARPT
19,845 Points

Try running sass --watch . in the directory that the main.scss and main.css/css.map files are located.

Jelger Kingma
Jelger Kingma
9,684 Points

Another nice app to use is CodeKit this will manage you project for you. You can keep on using your preferred coding tool like sublime text. (One but, it's mac only)