Dominate The Theme Layer

Click to watch "Dominate The Theme Layer"

Looking for nitty-gritty code? I created a toolbox with 500+ lines of documented code, that goes with the session.Tools are available at

Feel free to copy, re-use, fork or send me pull-requests with more examples and bug-fixes.

Drupal's theming layer is a powerful and beautiful beast, but it requires a firm hand to really behave. New themers often start out trying to control it with a light touch and gentle strokes of CSS. Only too late do they realize their error…

All too often the result of this misguided approach is bloated and inefficient CSS and JavaScript and site out of control. By the time the themer realizes what the beast have done, it might be too late to fix.

Don't let Contrib bully you around. Grab the reins, create a frontend architecture and teach the theming layer to produce lean, extendable, high performance markup and CSS that is easy and cost-efficient to maintain.

This session is about learning to take charge.

In this session

  • Techniques and workflows for domination.
  • Principles and benefits of a CSS architecture with inspiration from object-oriented CSS and SMACSS.
  • Base your frontend on relevant design and business goals instead of back-end architecture.
  • Designing your frontend for extensibility.
  • Avoiding common pitfalls and dangers when working with Drupal.

Tools of domination

The session will supply attendees with a range of useful tools and techniques of domination to make the beast behave, including preprocess functions, theme function overrides and templates.

Tools are available at

Feel free to fork, comment or send me pull-requests with improvements and bugfixes.

Intended audience

The session is aimed at beginner and intermediate themers, but also designers and site builders interested in transitioning from design to theme and building views and panels for extensibility and existing CSS.

Experience level: 
Time slot: 
Tuesday 14:15-15:15


Thanks. Very professional briefing on an important topic.

Made me thinking about how I could improve my css-markup in many ways...

Have thought of reading SMACSS for long time. After your sessions I think it will be part of my goodnight-read tonight...


It seems like there are two different audio tracks superimposed on this video. Unfortunately, the one that is related to this topic is not the loudest one.

Unfortunately there was an issue with first recording - featuring not only my presentation but also Larry Garfield's voice :-)

We did another recording of the session and the corrected version have now been uploaded on this page.

Wow! Thank you very much for that! I'm really looking forward to watching this as it is a very important topic about a constant struggle ;). Off to find my dog collar, thanks again!

Thank you for this session! I am writing a mobile theme for a site whose desktop theme has a 5,000 line CSS file, and I am looking to do the mobile much better. This object oriented approach makes a lot of sense to me, and I am going to check out SMACSS. Thanks, especially since the recording took a second try!