Sass中的硬注释后换行 [英] Line breaks after hard comments in Sass

查看:107
本文介绍了Sass中的硬注释后换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用最新的Sass与Compass addon。我想我的生产代码包括我的硬评论,但之后,我想有一个换行符。

I'm using the latest Sass with Compass addon. I want my production code to include my "hard" comments, but after that I would like to have a line break.

/*! Generic elements and layout */
/* *********************************************** */
html
  box-sizing: border-box
...

应输出如下:

/* Generic elements and layout */
html{box-sizing: border-box}...

可能性?我想在我的代码中包括来自第三方事物(flexbox等)的许可证。

Is this a possibility? I would like to include licences from 3rd party things (flexbox etc.) like this in my code.

推荐答案

否。这种事情需要修改Sass。你可以使用短C风格的注释来获得功能上相同的东西:

No. This sort of thing would require a modification to Sass. You could use the short C style comment instead to get what is functionally the same thing:

/*! Generic elements and layout */
// ***********************************************
html
  box-sizing: border-box


$ b b

前面加上双斜杠的注释不会是生成的CSS的一部分。

Comments preceded by double forward slash are never part of the generated CSS.

这篇关于Sass中的硬注释后换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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