Sass是否支持内联注释? [英] Does Sass support inline comments?

查看:147
本文介绍了Sass是否支持内联注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在我的 .scss 文件中保留这样的内嵌注释

  thead {
display:table-header-group; // h5bp.com/t
}

我不想在我的css输出。

解决方案

SASS中要考虑两种不同类型的注释。


  1. 单行注释 // 将被.scss预处理程序删除,并且不会出现在您的.css文件中。

  2. 多行注释 * / 是有效的CSS,并且会在从.scss到.css文件。




听起来像内嵌注解 code>是你要找的。

Can I keep an inline comment like this in my .scss file

thead {
    display: table-header-group; // h5bp.com/t
}

I don't want this comment in my css output.

解决方案

There are two different types of comments to consider in SASS.

  1. Single line comments // will be removed by the .scss pre-procesor, and won't appear in your .css file.
  2. Multiline comments */ are valid CSS, and will be preserved* between the translation from .scss to your .css file.

It sounds like inline comments // are what you're looking for.

这篇关于Sass是否支持内联注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆