Line breaks after hard comments in Sass

喜欢而已 提交于 2020-01-14 14:57:40

问题


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
...

Should be outputted like this:

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

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


回答1:


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

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



来源:https://stackoverflow.com/questions/16812933/line-breaks-after-hard-comments-in-sass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!