La Revanche du Site

Le retour de la revanche

Object-oriented CSS Heuristics for Programmers

Where do I find “best practices” for developing coherent & cohesive CSS???

I recently took this secret to my therapist twitter and saw that I wasn’t alone. 15 years ago we were building HTML by hand with <font size="2"> tags. Now we have Rails. Let that sink in a bit. That’s an insane amount of progress. BUT… Look at the CSS for virtually every big web app and the CSS is a disaster. There’s a mix of naming conventions, no organization, loads of repetition and probably hundreds if not thousands of lines of styles that are not even used anymore. So… how do we do it right? You can find a CSS snippet for a 3D spinning logo on fire on a thousand websites right now, but where are folks taking about building coherent, cohesive and maintainable CSS? How can we apply the practices of regular programming to CSS?

Enter: Object-Oriented CSS

Nicole Sullivan, aka stubbornella, wrote about her oocss framework in 2009 and has been whacking sense into folks ever since (and probably long before). Be sure to read the original OOCSS blog post that started it all and check out Nicole’s presentations, all of which are pure gold. (And many, many thanks to Brent Miller for turning me on to this!)

Comment faire pour gérer la complexité et la taille importante d’un site quand on aborde le problème des feuilles de styles CSS. Un début de réponse.