As a Rails developer I generally write both front and back-end code. However, I often find my stylesheets quickly become unorganised and are a pain to go back to and update without duplicating code somewhere.
The Rails convention creates stylesheet files for each generated resource and I understand there is some benefit there if you can configure it to only request stylesheets based on that resource (rather than the entire compiled application.css file)?
My question is for the front-end guys at Thoughtbot (and any other awesome front-end devs) and it’s related to how you organize your stylesheets?
Recently I read this great post by @CarolannBonner - which appears to take a modular approach of creating lots of partials in your views and then mirroring those partials as stylesheets in a /partials directory.
I also just discovered Github’s styleguide (which is awesome) - https://github.com/styleguide/css and they’re ‘file organization’ looks nice. I was thinking of applying something similar except changing the /components directory to a /partials directory since if I’m using Bourbon + Refills, most of the ‘components’ will already be defined so it’s more likely I’ll be tweaking partials instead.
Would love to hear some opinionated solutions for this topic which I don’t think gets that much attention! (I see there is a front-end development workshop - would love to see that online!)