Pantheon Community

How are you compiling your Sass?

I’m curious what community members are using for Sass compilation?

Are you compiling locally and committing the result?
Pushing Sass only to GitHub/Bitbucket/Gitlab and letting CI do the rest?

1 Like

as 99% of my projects are not using an external build tool, I compile local, and push that compiled CSS up.

I use gulp to compile SCSS, with a few pre-processors mostly around flexbox compatibility.

I’m using Webpack Mix in my own starter theme, which is less of a chore to setup than straight webpack. But also Gulp is nice too. Ahmad Awais has a nice project on github called WP Gulp that is a great starting point for tooling around with your theme assets.


Agreed on the WP Gulp repo, it’s quite helpful for getting started. I compile locally, but should be using a CI build process. :stuck_out_tongue_closed_eyes:

I like a CI build process for consistency. I’ve seen projects where developers compile locally and, even with the same source code, the production CSS is different due to varying local versions of the tools used to compile.

Compiling on CI is also nice for the convenience of being able to edit a source file without needing to clone everything locally. For a quick fix on a project I don’t have cloned down I can make a change on GItHub/GitLab/etc. and submit a PR very quickly. If it is an open-source project this lower barrier to contribution encourages other contributors.


We use a mix of tools depending on the age of the codebase and the destination of the project. The best of the best though is compiled on CI deploy. We definitely have projects where the infrastructure is not advanced enough to allow that, so we commit the CSS, grumble, and curse when we have merge conflicts. We tend to have less issues with version compatibility though because our projects ship lock files for yarn and we use Lando to maintain Node versions of course!

My favorite setup for compiling sass is Laravel Mix for its simplicity and parity with my Laravel work. It’s built on webpack. I’ve been toying with going pure CSS in the future, especially as I am doing more Vue work.


We use Gulp locally, but I am hoping to move to more CI tooled workflow this year.

We also compile locally (grunt + compass) and commit the final CSS files.

We use Mix as well as the Sage (Roots) build system, depending on the project. Compiling always in the CI, never commit minified code unless it’s in a packaged plugin that is composer installed or something.

In the time since I started this thread I have started using CircleCI to compile the Sass for my Sage WordPress theme.

One Circle job runs the npm command and persists the dist directory which is ignored on Pantheon. The next Circle job pushes to Pantheon.


As most of my work is done by me alone, a local GULP process does the work, but I’m working towards CircleCI or BitBucket Pipelines doing it as well, after a merge request to master, later this year for all my active projects.

We use a base theme and create sub themes. Sass compilation is done locally, committed and pushed to multidev.

sass --watch scss:css

We’re keeping it simple.

1 Like

Looks like you’re using Sage… nice! What version?

Looks like I’m on 9. I didn’t dig too deep into Sage since my site is pretty minimal.


We’ve been developing a Drupal module to process SASS / SCSS and have just released 1.0. We developed it especially for Pantheon, but it should work on any platform that supports PHP. It is pretty self-explanatory. We use it to develop in the dev environment, generate changes, and then roll it out to live without needing to clone our environment to a local environment every time. It includes drush commands.


In another thread I mentioned using Branch CI for helping with build steps. I’m now using that to compile and build assets for a couple of my projects. It works well. But if you can get Circle CI working, that’s probably the best and most cost efficient method. Branch CI is pretty sweet, though. Important to note, this works with WordPress sites.

1 Like

We use a local Gulp workflow to compile Sass and commit the Sass/CSS. This lets us test designs locally before pushing them to our Multidevs.

Are there any advantages to moving Sass compilation to a CI workflow?

1 Like

We follow a similar process. We have a pretty small team where all of our SCSS is compiled prior to pushing it.
I’m trying to determine if we’d actually see any benefits of moving to a CI workflow, or if it’s just overkill for us.


if you have teams larger then two, I would reccomend a CI process, as its very easy to be working on SASS and then step on peoples work if you’re pushing compiled CSS up.

That way, your SASS work is safe, of course, but something between you and the target environment is doing all of the compilation work for you.

Other wise, you’ll have to make sure there’s a manual step fo merging and re-compiling, before you go up to Pantheon. Which, isn’t hard - just an extra step.

Depending on how complex the project is - plenty of other reasons to use CI as well.

1 Like