SCSS是否支持嵌入式注释? [英] Does SCSS support inline comments?
本文介绍了SCSS是否支持嵌入式注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在.scss
文件中保留这样的嵌入式注释吗?
Can I keep an inline comment like this in my .scss
file
thead {
display: table-header-group; // h5bp.com/t
}
我不希望CSS输出中出现此注释.
I don't want this comment in my CSS output.
推荐答案
在SASS中需要考虑两种不同类型的注释.
There are two different types of comments to consider in SASS.
- 单行注释
//
将由.scss预处理器删除,并且不会出现在.css文件中. -
多行注释
*/
是有效的CSS,在从.scss到您的.css文件的转换之间将被保留*.
- Single line comments
//
will be removed by the .scss pre-procesor, and won't appear in your .css file. Multiline comments
*/
are valid CSS, and will be preserved* between the translation from .scss to your .css file.
- 某些压缩模式除外,除非您以
!
开头注释.请参阅 http://sass-lang.com/docs/yardoc/file. SASS_REFERENCE.html#comments .
- Except for some compressed modes, unless you start the comment with a
!
. See http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#comments.
您似乎正在寻找内联注释//
.
It sounds like inline comments //
are what you're looking for.
这篇关于SCSS是否支持嵌入式注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文