I'm using the Susy SASS-library. I'm compiling one main SASS-file that @imports various partial SASS-files. Inside the partials I use Susy-mixins. Do I need to @import "Susy" for every single partial SASS-file? What's the smart way to do this?
Asked
Active
Viewed 114 times
-1
-
Did you try it with and without? Seems like that would have given you your answer. – cimmanon May 01 '15 at 17:26
-
I've been experimenting with the best way to do this before asking this question. I'm not sure why it didn't work for me at first, maybe because I forgot to include the $susy configuration variable. @allejo's answer cleared up any confusion I had. Imported mixins and variables appear to be available across partials. – mgussekloo May 04 '15 at 09:01
-
When you have an error, you need to be providing that error. Otherwise it just looks like you have an exceptionally lazy question where you didn't bother trying anything. – cimmanon May 04 '15 at 10:26
-
True, that. I guess I could have phrased my question differently to not come across as lazy. Thanks for the heads up. – mgussekloo May 05 '15 at 10:40
1 Answers
1
You can just have a single @import "Susy"
before you import all of your other partials. As long as your main file imports Susy first, your partials will be able access it.
@import "Susy";
@import "partials/header";
@import "partials/footer";

allejo
- 2,076
- 4
- 25
- 40