Search code examples
ruby-on-railscsscompass-sass

When do you use partials in compass?


I understand that partials in compass do not create a separate .css file. But I don't understand when/why would I ever want to use this?


Solution

  • Mostly just for organization and separation of logical pieces of CSS. For example, I keep a _reset.scss that I can paste into any project, then have things like _layout.sass, _homepage.sass, etc. They all get shoved into a single compiled CSS file (so I don't have to deal with multiple HTTP requests), but I can get to the styles for any given piece of a project quickly and easily.