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:
Author: Felix Krusch
Author URI:
Description: A mobile first, responsive blogging theme with a minimalistic design.
Version: 1.0
License: GNU General Public License v2 or later
License URI:
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.

9 thoughts on “Keep Comment in Compressed SASS / SCSS Output”

  1. For me in Sass 3.5.1 the exclamation mark stays in the compressed version but doesn’t cause any harm and still functions properly. Thanks for the help!

  2. Any ideas why this does not stay as comments when output_style = :compressed
    Theme Name: CASINO Child
    Description: Child theme for main theme
    Author: IB
    Template: template

  3. Learning something new every day. :) Even though this is a post made in 2013 still useful in 2017!

    Thank you`.

  4. This is awesome! I’m using rtlcss to create a version of a site in Arabic. I use SASS to compile a styles.css file and then run rtlcss to create the Arabic version. In the CSS you write value directives for edge cases; like arrow direction. This tip was the solution I was looking for.

    .icon-next {
    z-index: 4;

    /*horizontal flip*/ /*left-right mirror*/
    -moz-transform: scale(-1, 1);
    -webkit-transform: scale(-1, 1);
    -o-transform: scale(-1, 1);
    -ms-transform: scale(-1, 1);
    transform: scale(-1, 1);

Leave a Reply

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