DRY CSS - Theries, methods and tools for efficient and scalable Stylesheets. A talk given at WordCamp NYC 2012.
The value of keeping all code D.R.Y (Don't Repeat Yourself) is universally accepted and demanded in the world of programming, but when it comes to CSS we've all learned to compromise and live in a wet mess. We don't have to! This talk will go over how you can use thematic and structural CSS definitions to cut down on wasted code, simplify maintenance and unify your site styles just by DRYing out your standard CSS. I'll explain how tools like Firebug enable a whole new way of understanding complex style interrelationships and give examples of the particular patterns that let me cut one stylesheet from ~4200 to ~2400 lines without losing anything but wasted code! We'll also cover how preprocessors like LESS and SASS can take your DRY CSS even farther by actually programming your styles as if they were made of PHP.