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.
About Jeremy Clarke
Jeremy Clarke is a PHP, HTML, CSS and WordPress hacker from Montreal. He loves his job working on the nonprofit citizen media site Global Voices, where he manages dozens of WordPress sites, blogs, plugins, themes and a couple of bitchy Linux servers. He has a communications degree from Concordia University, but is mostly a self-taught web developer. Jeremy has been an organizer of WordCamp Montreal since it started in 2009, and has spoken at many other WordCamps as well.