alphagov/govuk_elements — pull request #27 by tombye (2014-09-01 12:56:07+00:00)
Title: Move Sass imports out of global space

Projects/prototypes using Rails need `@import`s to be defined in the partial file that uses them because they do not inherit the scope of the file they are imported into.

Because of this, having the imports from the toolkit at the top of `main.scss` breaks compilation in Rails because they are not recognised by partials such as `_forms.scss` further down.

This makes all `@import`s local to the partials that use them meaning it can work with both Rails and the [grunt-sass](https://github.com/sindresorhus/grunt-sass) (used in the prototyping kit).

Implementing this approach meant renaming `elements/typography.scss` to `elements/elements-typography.scss` because having them as the same name caused a reference loop during compilation.