Drupal & Codekit – Try Link CSS

As has been pointed out in other places, Drupal and Codekit don’t play well out of the box. Codekit, specifically, can’t inject SASS changes into a Drupal site without refreshing the page. “Live Editing” is one of it’s primary features.

Codekit is one of the main reasons I decided to really get into SASS at all. I’m coming from years of using CSSEdit, and am very, very used to a workflow involving live editing. Edit/save/refresh was always just way too slow.

So, being that I mainly work in Drupal these days, not having live SASS injection was a real bummer. I had to eventually try out LiveReload, which did work, but it wasn’t as elegant as Codekit.

As was pointed out by Nick Comito, what you needed to do was to link directly to your compiled style sheet after the normal Drupal styles, then voila – Codekit works perfectly.

I took what he suggested, and whipped up a Gist using the path_to_theme variable.

Looks like, though, someone else was having this same issue. Graham Bates helpfully contacted me through the Gist and pointed out that he had created a simple module – Link CSS, that does this for you.

I’ve tested it out, and sure enough, Codekit works like a dream with Drupal – check it out!

Read More3 Comments