-
Jed Schneider
-
Wynn Netherland
-
Kevin Zurawel
-
Wynn Netherland
Hey there, I'm Wynn!
I'm a front-end designer & developer, CSS & JavaScript framework fanboy Razorback living in Texas.
Featured
-
Recently
Archives
Links
The Changelog – Open Source moves fast. Keep up.- cartagen - Client side framework for creating vector maps in HTML5
- NoRM - Bringing MongoDB to .NET, LINQ, and Mono
- Episode 0.1.6 - Ajax.org frameworks with Ruben Daniels and Rik Arends
- Git clone some nostalgia - NCSA Mosiac
- Ghost means never having to touch /etc/hosts again
- Prism - command line and Ruby library parser for Microformats
- Pull! Skeet - Twitter Extension for Google Chrome
- QR - Easy Redis queues with Python
- Faye - dirt simple pub/sub for Rack and Node.js
- FOWA 2010: David Recordon on Facebook Open Source Projects






Sass up your WordPress themes with Compass
I’m a Rubyist. But I’m also a pragmatic front-end developer. When I have to write a full-stack solution, I pick Rails or Sinatra because writing Ruby is a joy and the Ruby ecosystem is so darn cool. But when I have to create a CMS-based site for myself or a client I love the usability and community behind WordPress. Although I can reluctantly lay Ruby aside when I extend WordPress, I really miss my syntactically awesome stylesheets. Until now.
Introducing compass-wordpress
After turning my buddy (and Haml/Sass/Compass ninja) Adam onto Thematic, the awesome WordPress theme framework from Ian Stewart, we quickly started lamenting our loss of mixins, nested rules, variables, and bundled patterns we got from Sass and Compass. Fueled by a dream of writing WordPress themes without curly braces and armed with some info from Chris Eppstein, we hammered out a new gem – compass-wordpress.
Features
Compass-wordpress includes:
Installation
Since compass-wordpress is a Ruby gem, you install it and its dependencies via ruby gems. If you haven’t yet switched to Gemcutter, you’ll need to do that first:
Then install compass-wordpress:
Compass will also be installed if you don’t have it. If you’re new to Compass, head over to the wiki and checkout all the great info over there.
Usage
To stamp out a new blank WordPress template, drop into your themes folder in a terminal and run the compass command:
In this example we’re creating a new Thematic child theme. (You already have the Thematic theme unpacked to your themes folder right?) Let’s look at what we’ve got in our shiny new theme:
If you want a different folder structure for your Sass and compiled css files, you can pass advanced options in the command line:
Developing your theme
The only change to your theme development workflow is using Sass instead of CSS. We compile that Sass into CSS using the
compasscommand again.This will launch a process to watch your source files and automatically re-compile your CSS referenced in your theme. As long as this process is running, you can just refresh your browser to view your changes. When you’re done, just
CTRL-Cto stop the compass process and deploy your theme as you normally would. It’s that simple!Get involved
If you’re into WordPress development (especially if you’re partial to another theme framework), why not fork us and join the party?
Related posts: