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

Phil White
PLUS
Phil White
Courses Plus Student 9,519 Points

Delay on sass

Hi,

I'm just doing the sass basics tutorial and got everything set up but when i save out my .scss file there is a long delay on it popping up in my css file and i have to restart the sass --watch . process every time i change the .scss file

What can i do to speed it up and keep it running off 1 sass --watch . process?

Thanks for all help in advanced!

2 Answers

Hello Phil,

Sass files can compile slowly, but it shouldn't be as slow as you are describing if the files you are working with are relatively small. One way to speed it up is by using Libsass, which is a C implementation of the Sass compiler.

Regardless of which compiler you are using, running sass --watch . should continue to watch for changes without needing to run it again. One thing that might help is to specify which files are your input and output files if you are not already. You can do this with the following command: sass --watch input.scss:output.css.

Do any of these suggestions help address your problem?

Phil White
Phil White
Courses Plus Student 9,519 Points

The

sass --watch input.scss:output.css.

part just comes up error and i haven't got a clue how to download and use Libsass?

How many minutes is the usual delay?

Thanks for your help so far anyway

When compiling Sass, the delays should be seconds rather than minutes. So it sounds like you are having other issues, and we don't have to worry about trying to use Libsass. I am not sure how you set up Sass in the first place, but it might be a good idea to start from scratch. If you are using a Mac, Ruby comes pre-installed, so Sass is easy to get. Just run this in the Terminal:

gem install sass

If you use Windows, the Sass Install Page can get you started. There is also a Stack Overflow thread that can help you set it up if you have problems.

Sorry you are having such an issue with Sass, its a really powerful tool when you get it running.

Phil White
Phil White
Courses Plus Student 9,519 Points

Yeah I've got it all installed properly but its just the speed that is a issue.

Thanks for all your help anyway! i will just have to hunt around for a fix.