Having your stylesheets neatly organized

A helpful #rubyonrails denizen named Dema posted an entry to his blog today and asked if his Rails solution was useful to anybody. Boy is it ever! Here’s what he has to say:

At first, you start with a global CSS file, included in every page thru the ‘link’ tag. But as your website grows in complexity, so does your CSS file and things start to get real messy. Suddenly, you can’t find anything in that gigantic CSS spaghetti…

The next logical step, of course, is to part out your CSS into smaller files—which you must tediously include “by hand” with stylesheet_link_tag. Unless, of course, you use his simple bit of code that will do it for you. Marvelous. Go tell the man he done good.

No Comments

  1. Dema says:

    Hi Amy,

    There’s an update to my post there. I’ve turned it into a patch: http://dev.rubyonrails.com/ticket/1859

Hey, why not get a shiny
Freckle Time Tracking
account?