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: https://github.com/founddrama/orin
- During my
src/scssdirectory, I keep all my
_include.scssfiles and also the
style.scssfile which has all the
- Throughout development, I simply run the typical
sass --watch(although this is an extra key to make sure to save the
- When your SCSS source is searching good and devoted to version control, you can just build the
style.cssand 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:
touchto produce the
- apply the license text
- compile the SCSS and append it to
Newer versions of Sass include support for
/*! loud comments */ and therefore I have to leave my lazy butt increase to:
- Range from the license text and theme description immediately in
style.scsswhile using noisy comments
- update the build/deploy script to merely compile the SCSS.