有没有一种方便的方法让SASS自动在每个CSS输出文件的开头添加注释? 具体来说,在使用Compasss时,我想贴一个简短的警告,告诉设计师不要直接编辑CSS,并指示他们开始使用Compass。 我使用:compressed的输出样式,它删除输入SCSS / SASS文件中的注释。
如果没有一个方便的方法来做到这一点,那么我会提交一个问题/补丁。 我正在考虑添加一个名为:output_prefix的选项 ,该选项需要一个字符串,该字符串将被添加到所有输出CSS文件中。
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.
最满意答案
压缩去掉所有评论。 我建议你把它放在一个属性中:
warning { do-not: "edit this file"; }关于提议的补丁,我认为这个用例不足以保证这个功能。
compressed strips out all comments. I suggest you put this in a property:
warning { do-not: "edit this file"; }Regarding the proposed patch, I do not think this use case is compelling enough to warrant such a feature.
更多推荐
发布评论