Menu icon Foundation
How can I @import Foundation files into a different directory in my Rails 4 app?

I have a Rails 4 application and am using Foundation 5. I am also using Compass.

I want to be able to import all my scss files into a single core stylesheet file, such as the following:

@import "compass";
@import 'foundation/foundation';
[other imoports]
            

         

However, this does not appear to be possible when using Compass, since Foundation files, it appears, must live in "app/assets/stylesheets" while Compass files need to live in a separate directory (eg. '/sass') which are then compiled to the "app/assets/stylesheets" directory.

How can I configure Foundation and/or Compass such that I can import both into the same files. Or is there a path I can use in my import to accomplish this?

For reference, I have also posted this question on Stackoverflow: http://stackoverflow.com/questions/22819357/how-can-i-configure-compass-and-zurb-foundation-5-in-my-rails-4-app-so-that-they

Thanks for any advice or assistance!

installcompassSassrails

I have a Rails 4 application and am using Foundation 5. I am also using Compass.

I want to be able to import all my scss files into a single core stylesheet file, such as the following:

@import "compass";
@import 'foundation/foundation';
[other imoports]
            

         

However, this does not appear to be possible when using Compass, since Foundation files, it appears, must live in "app/assets/stylesheets" while Compass files need to live in a separate directory (eg. '/sass') which are then compiled to the "app/assets/stylesheets" directory.

How can I configure Foundation and/or Compass such that I can import both into the same files. Or is there a path I can use in my import to accomplish this?

For reference, I have also posted this question on Stackoverflow: http://stackoverflow.com/questions/22819357/how-can-i-configure-compass-and-zurb-foundation-5-in-my-rails-4-app-so-that-they

Thanks for any advice or assistance!

Anders Ramsay over 5 years ago

Sorry, meant for the sample stylesheet to read:

@import "compass";
@import "foundation_and_overrides";
[other imports]