Here's as a solution which doesn't require any re-routing of the bourbon/neat .scss paths in Gruntfile.js or main.scss, just a tinker with the watch task for the .scss files. This all came after getting errors similar to the other posts here.
I wanted to break the demo styling out into separate files to augment ./app/sass/main.scss
and make the whole thing more modular and user-personalised.
Firstly set up the following: ./app/sass/user/user-main.scss
.
Secondly set up the following: ./app/sass/user/02/user-secondary.scss
Then in Gruntfile.js edit grunt.initConfig > watch > sass > files
to read as this:
files: ['<%= config.app %>/sass/**/**/**/{,*/}*.{scss,sass}']
I edited the files task only, nothing else, and that is on or around line 51. Making this edit allows for grunt to auto upload when styling is edited/saved in whichever directory you work in.
You'll see that i've added wildcard selectors for 3 directories deep. I generally don't go any deeper than that if poss but that's down to the project/individual.
Then in the stylesheets i did the following:
- in main.scss left the bourbon/neat @import rules as they are, no changes
- in main.scss - after the bourbon/neat imports - added:
@import 'user/user-main';
- removed all of the styling declarations from main.scss and put them inside
user/user-main.scss
- at the bottom of
user/user-main.scss
added: @import '02/user-secondary';
This sass should be intuitive and the structure is just for a use-case.
With this i have cleaned up main.scss of all the styling declarations, and this file now serves only as the root of all styling imports. From there the project is broken out into user-specific directories/stylesheets, which is what i wanted.
Then just run grunt build
and grunt serve
and edits can be made to the /user/ stylesheets and the whole thing auto-loads without errors.
As a final tweak, i wanted to add some padding to the outer-container
mixin which is applied to the body
to stop everything going flush to the viewport edges, as posted here. So in user/02/user-secondary.scss
i added @include pad(0 10px);
to body. It's a bit hacky as it actually reduces the width of the container, but it does apply some space at the viewport sides.
Hope this helps!