Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sass watch is detecting changes but not compiling to css

When I run sass --watch app.sass:app.css terminal shows that changes have been detected to sass but won't compile to css. I am using Bourbon so all my .scss and .sass files are imported via mixins.

ex.

 >>> Sass is watching for changes. Press Ctrl-C to stop.
 >>> Change detected to: css/2-modules/top-nav.scss
like image 338
tonyynot Avatar asked Jan 22 '15 23:01

tonyynot


2 Answers

Make sure the file you are saving with an _filename.scss has been properly imported into the mainfile.scss. if you have not imported the _filename.scss it will detect a change but not compile.

like image 121
iamlukem Avatar answered Oct 01 '22 22:10

iamlukem


I had the same issue! In my case, it was caused by having several @imports listed like this:

@import 'colors';
@import 'fonts';
@import 'size';

When i changed it to this it all started working again:

@import 'colors', 'fonts', 'size';

Although it should not be needed:
"Sass imports have the same syntax as CSS imports, except that they allow multiple imports to be separated by commas rather than requiring each one to have its own @import." - sass-lang.com/documentation

like image 40
philipdev Avatar answered Oct 01 '22 22:10

philipdev