Easiest way to add SASS to my theme

Hello Sitepointers,
I’ve created the necessary SASS, CSS, & HTML and would now like to turn it into a theme. Using a bare-bones starter theme, what is the easiest, simplest way to get Wordpress to recognize or compile my SASS files? In my local environment using Atom, I’m compiling my SASS files into a minified CSS file, and then calling both the minified CSS file and style.css to my index.html.

How do I get wordpress to work with my SASS files on my Ruby/SASS enabled hosting site?

Every tutorial I come across seems to recommend Gulp, node pm, Compass, Koala, etc, but this is a simple site with just a few SASS files I need to work.

Help! :weary:

@GOLGO_13 WordPress won’t compile the SASS files for you, but if you’re already compiling your Sass files into a minified CSS file you can just enqueue the minified CSS file in your WordPress theme.

1 Like

So I found a write-up and a plugin that seem to be doing the trick!

Plugin: WP-SCSS
Write-up: http://aspiringwebdev.com/category/wordpress/

After stumbling around the interwebs longer, I see now that I didnt understand Gulp, or how task-runners work. Gulp sets up and creates the javacript files needed to compile SASS. I never was able to get it to work properly, but at least I know in theory how to proceed with Gulp if the plugin ever fails, or just follow @jonathanbossenger simple suggestion.

The bummer with the WP-SCSS plugin is that as the name implies, it ONLY works with .scss flavor of SASS - NOT with .sass:pensive:

I found a thread on Stackoverflow to implement Jonathan’s suggestion. I’m compiling and minifying locally, so this works for me:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.