Skip to content

Instantly share code, notes, and snippets.

@kiwiupover
Created December 3, 2012 17:28
Show Gist options
  • Save kiwiupover/4196546 to your computer and use it in GitHub Desktop.
Save kiwiupover/4196546 to your computer and use it in GitHub Desktop.
SASS setup for the team

##SASS setup for the team## Below is the setup file for the admin section of the site.

At the top on the admin-app.scss file we added all the dependancies we use in our style sheets :ie compass modules, files of color variables and files we use for the css framework.

As you can see below all the files under the pages folder are partials ie "_search_accounts.scss" and then that file is imported into that admin-app.scss. This means that file has access to the css framework and any imported dependencies.

With the admin section we have two main scss files

  1. admin-app.scss
  2. ie8.scss this is the ie specific file

####All the other files are partials:#### The reason, rails assest pipeline will compile every file that is not a partial and when that file complies and has "@import compass" at the top of the file rails loads all of the compass framework to compile that file.

####Going forward we need to refactor the scss files to follow these principles.####

  1. Only two top level scss files for a section of the site. ie Admin section, CYB Section, Dashboard, etc.
    • one file with all the dependancies imported into this file
    • another file for IE specific styles
  2. All other files need to be partials "_file-name.scss" and inported into the main scss file. -Donot- include compass into any partials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment