February 29 - March 2, 2012
Montreal, Canada

DRYing CSS for brevity, unity and maintainability

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 it can seem like the limitations of the language offer no way to achieve proper DRYness without becoming dependent on external pseudo-CSS-parsing tools like LESS or SASS. Don't believe the grief, we've just all been doing_it_wrong()!

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!

I'll also cover how DRY CSS principles simplify cross-browser compatibility and Right-To-Left (RTL) language support by grouping workarounds into structural sets.

View all 161 sessions

Jeremy Clarke

Global Voices Online

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.

Jeremy co-founded the Montreal WordPress community and has helped organize all three WordCamp Montreal events as well as speaking at many other WordCamps across North America.

Read More

Presented by

Sponsored by

Media