在SASS / Compass输出上添加注释(Prepend comment to SASS/Compass output)

编程入门 行业动态 更新时间:2024-10-27 03:39:33
在SASS / Compass输出上添加注释(Prepend comment to SASS/Compass output)

有没有一种方便的方法让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.

更多推荐

本文发布于:2023-08-04 23:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1424171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:注释   Compass   SASS   output   comment

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!