How can other Wordpress theme designers incorporate Sass to their theme development while benefiting from its compressed output style? Sass compressed removes ALL comments, and so i presently come with an empty style.css with my theme declaration as well as an @import calling the minified css from compass, but this hardly appears prefer solution.

Has anybody found a means for this? What will be the best answer otherwise?

SUPER SHORT VERSION: Use /*! loud comments */ and compile the SCSS right before packaging and disbursing.

Two part answer, "old part" first:

I made use of Sass/SCSS when developing my "Orin" theme:

The Beginning:

  • During my src/scss directory, I keep all my _include.scss files and also the style.scss file which has all the @import claims.
  • Throughout development, I simply run the typical sass --watch (although this is an extra key to make sure to save the style.scss file).
  • When your SCSS source is searching good and devoted to version control, you can just build the style.scss into style.css and appearance that into version control for that Theme that will get distributed.

During my situation, "Orin" is simply for me personally, and so i carry out the build after i update it around the blog server, however the SCSS compilation can just like be easily done just before packaging/distribution. The build script I am using is here (for the reason that Github repo) the gist from it being:

  1. touch to produce the style.css output file
  2. apply the license text
  3. compile the SCSS and append it to style.css.

Part Two:

Newer versions of Sass include support for /*! loud comments */ and therefore I have to leave my lazy butt increase to:

  1. Range from the license text and theme description immediately in style.scss while using noisy comments
  2. update the build/deploy script to merely compile the SCSS.