Aug 25, 2006 14:34
I'm back to working on $RAILS_APP full time again. I think my HTML/CSS skills have finally reached the point where I can design a layout that doesn't suck. They're not great, mind you, but at least I don't want to gouge my eyes out any more.
One thing I've learned the hard way is to better organize my stylesheets. My original 'organization' was rather haphazard and too granular. I literally started losing track of which stylesheet applied to which view.
So, I've come to a decision: there shall be one stylesheet per controller, and that shall be applied to each corresponding .rhtml file. I will properly wrap all tables, etc, in their own
tags and provide class names as appropriate. Thus, users.css will be used for show.rhtml, list.rhtml, etc, for the Users' view. The
tag id's and class names will be used to delineate between .rhtml files, where necessary.
Keep in mind that I'm using a relatively light amount of CSS in general - less than 1 page of text per stylesheet.
How do other folks organize their stylesheets?
ruby,
rails