Sass watches detect changes but don't compile in css

When I run the sass --watch app.sass:app.css terminal sass --watch app.sass:app.css , it shows that the changes were detected in sass, but will not compile in css. I use Bourbon, so all my .scss and .sass files are imported through mixins.

ex.

  >>> Sass is watching for changes. Press Ctrl-C to stop. >>> Change detected to: css/2-modules/top-nav.scss 
+7
css mixins sass compass bourbon
source share
4 answers

Make sure the file you save with _filename.scss been correctly imported into mainfile.scss . if you did not import _filename.scss , it will detect the change, but it will not compile.

+7
source share

I had the same problem! In my case, this was due to the fact that several @imports were listed as follows:

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

When I changed this, everything started working again:

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

Although this is not necessary:
"Sass imports have the same syntax as CSS imports, except that it allows you to separate commas for multiple imports, instead of each having its own @import." - sass-lang.com/documentation

+2
source share

check the Config.rb file in your folder. without it, you must execute Ctr c each time and skip this command sass --watch scssname: cssname

then you can find your code in css.

0
source share

Are you sure all your partial files are imported into app.scss? I had the same problem, only to implement the partial file that I modified (_custom.scss) did not actually import main.scss.

0
source share

All Articles