I use Foundation with Compass and Sass to create the stylesheets. In my scss
folder I have _settings.scss
, app.scss
and files specific for each page group. For example, customers page has it's own stylesheet as well as settings.
I want to keep the files separated for easy use and for reduced file sizes. If I transfer all the files in one piece, it's a huge waste because some of the styles are only needed on one page. My app.scss
has general styling for the page and it is included in all the pages. In top of that file I have
@import "settings";
@import "foundation";
@import "compass/layout.scss";
These allow me to use the built-in functions like rem-calc
from Foundation. However, if I include these in all of the different stylesheets, I get duplicates of these styles inside the includes. Including foundation
generates a huge amount of styles and I don't want to have duplicates of them.
If I don't include these files, I can't use things like rem-calc()
. Without the import lines the Compass compiler doesn't know what to do with the mixins etc.
How do I keep my files separated but have the functionality of the Compass and Foundation stylesheets without including them multiple times?