Is there a convenient way to have SASS automatically prepend a comment to the beginning of each CSS output file? Specifically, when using Compasss I'd like to stick a brief warning telling designers not to edit the CSS directly and to point them to instructions on getting started with Compass. I use an output style of :compressed
, which strips out comments that are in the input SCSS/SASS file.
If there isn't a convenient way to do this then I'll submit an issue/patch. I was thinking of adding an option named :output_prefix
that takes a String that will be prepended to all output CSS files.
From the SASS reference on comments:
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.
So you could start your SASS file with something like this:
/*!
* WARNING: Don't edit this file by hand! Instead, you should be using Compass.
* (More information at http://compass-style.org/)
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With