Keep Comment in Compressed SASS / SCSS Output

If you are writing your WordPress Theme CSS with SASS and need to keep the first comment with the theme name, license, tags, etc. when compiling your style.css compressed, then you will need to use a so called loud comment.

Loud comments start by including an exclamation mark like this:

/*!
Theme Name: The Best Theme Ever
Theme URI: http://richwp.com/themes/best-theme-ever/
Author: Felix Krusch
Author URI: http://richwp.com/
Description: A mobile first, responsive blogging theme with a minimalistic design.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, gray, white, one-column, two-columns, right-sidebar
*/

… instead of starting with just:

/*

The compiled and compressed output will not include the exclamation mark.

One thought on “Keep Comment in Compressed SASS / SCSS Output”

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like...