The app I’m working on right now has thousands of line of code. To maintain the codebase, I think the best way is to document the css file. Kneath created an awesome gem for it.
Inspired by TomDoc, KSS attempts to provide a methodology for writing maintainable, documented CSS within a team. Specifically, KSS is a documentation specification and styleguide format. It is not a preprocessor, CSS framework, naming convention, or specificity guideline.
5. Edit your views/kss/home/styleguide.html.erb and css file. Create a new documentation. Data such as “Styleguide”, “Css description” must be correct on both files. KSS will process the entire “Styleguide” css block.
6. Refresh KSS page and you will see the generated documentation.