Reputation: 21
I'm using Foundation 4, Compass and SASS (I use the Compass gem to create new projects). But, I am a little lost. Where do I place my own scss files?
Compass creates a sass stylesheet directory that contains
I work in a modular way, where I have a number of stylesheets such as navigation, content, footer etc. Where do I include my scss files? Do create a partials folder, then import them in the app.scss?
If I import them into app.scss, this will append my CSS to the end of app.css. But, using Compass watch, it also creates each one of my partials ... which are not needed because they're being appended to app.css.
I've looked on the compass, sassy and Foundation site and I can't seem to find out how to do this. Because I'm using Foundation, I thought the information I require may be on there but I can't find it. It seems to be a SASS issue, and not a Compass or F4 issues. It's a little confusing and not documented on the web from what I can find.
Upvotes: 2
Views: 1210
Reputation: 40423
Name partials starting with an underscore _footer.scss
and then import them into your app.scss
(or whatever you call it) with @import 'footer'
. If you don't use an underscore in the file name, it will create a CSS file, which seems to be the problem you're having.
Compass is completely agnostic about your file names or structure.
You can, for example, import files in folders:
@import 'partials/footer'
@import 'partials/navigation'
Or, if you install sass-globbing, you can import an entire folder like this:
@import 'partials/*'
Upvotes: 4