css_canon

Imposes a "canonical" css/sass/SMACSS structure on a Rails 3.x project.

  • Assumes using Zurb Foundation. Pull requests for Bootstrap or other frameworks welcome.
  • imposes the following directory structures

      ├── app
      │   ├── assets
      │   │   └── stylesheets
      │   │       ├── application.css.scss
      │   │       ├── base.css.scss
      │   │       ├── foundation_and_overrides.scss
      │   │       ├── home.css.scss
      │   │       ├── layout
      │   │       │   └── grid_additions.css.scss
      │   │       ├── module
      │   │       │   └── 
      │   │       └── vendor_overrides
      │   │           └── 
      └── vendor
          ├── assets
          │   └── stylesheets
          │       ├── non_sass
          │       │   └──
          │       ├── sass
          │       │   └──
          │       └── vendor.css

Example

For an example rails app using this structure, see this repo

Installation

Add this line to your application's Gemfile:

gem 'css_canon'

And then execute:

$ bundle

Or install it yourself as:

$ gem install css_canon

Usage

rails g css_canon:install

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request