Search code examples
compass-sass

how to generate empty css items with compass sass?


compass defaultly not getnerate css items ,but I want to keep these items alway,because sometime I can use firebug code these empty items .any way to keep them, how to set?
enter image description here


Solution

  • There is a quick solution: added a comment in each non-deletable property to keep.

    .help_center {
      /*! keep */
      .nav {
        /*! keep */
      }
    }
    

    The documentation says:

    When the first letter of a comment is !, the comment will be interpolated and always rendered into css output even in compressed output modes. This is useful for adding Copyright notices to your generated CSS.