Skip to content

Instantly share code, notes, and snippets.

@dfischer
Created June 28, 2012 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfischer/3014753 to your computer and use it in GitHub Desktop.
Save dfischer/3014753 to your computer and use it in GitHub Desktop.
Framework Driven Stylesheet Layouts
app/
assets/
stylesheets/
layouts/
_base.css.scss
_blog.css.scss
_layout.css.scss
layouts.css.scss
products/
_product.css.scss
products.css.scss
pages/
_index.css.scss
_contact.css.scss
_partners.css.scss
pages.css.scss
ui/
_icons.css.scss
ui.css.scss
application.css.scss
Kristian Israel 5:16 PM
thats nice
Daniel Fischer 5:16 PM
the idea is layouts are generic
5:16 PM
ui is generic
5:16 PM
anything related to a controller/model (let's say they were scaffolded)
5:16 PM
would create an assumed directory structure
Kristian Israel 5:16 PM
that sounds nice
Daniel Fischer 5:16 PM
like products/
_new.css.scss
products.css.scss <--- included finally all in here
5:16 PM
anything that's from a controller/model is namespaced
5:16 PM
w/ a body wrapper
5:17 PM
body.products {
}
5:17 PM
So whatever you define inside will never affect other pages
5:17 PM
unless you extrapolate it out into _ui file or something
Kristian Israel 5:17 PM
that is SOoooo niceee
5:17 PM
right
Daniel Fischer 5:17 PM
So it forces all your code to naturally not conflict
Kristian Israel 5:17 PM
wow i love
5:17 PM
lets have children
Daniel Fischer 5:17 PM
and if you want to refactor OUTWARDS to be more generic you have the structure to do so
Kristian Israel 5:17 PM
and name them tag and header
Daniel Fischer 5:17 PM
lololol
Kristian Israel 5:18 PM
thats freaken cool
Daniel Fischer 5:18 PM
Cool
Kristian Israel...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment