I'm using the Zurb Foundation 4 (S)CSS framework, and I'm running into an issue of massively duplicated styles. This is because in every file that I @import 'foundation'
in, all styles from Foundation are also imported (rules for body
, .row
, .button
and friends). This leads to long SCSS compile times and a hard to navigate web developer console in Chrome, as all of Zurb's styles are declared four or five times.
To mitigate this, I've created a globals
scss file, which contains the overrideable variables that Foundation uses (it's copy-pasted from foundation_and_overrides.scss
, then foundation_and_overrides
import globals). Importing just the globals.scss
file gets rid of duplication only in files that don't make use of Foundation mixins.
It's in the files which make use of Foundation mixins: Can I import only the mixins from an SCSS file, without importing the concrete Foundation styles?
compass install foundation
should have generated a _settings.scss file for you. – Bespeak