Line breaks after hard comments in Sass

2019-07-05 02:31发布

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条回答
小情绪 Triste *
2楼-- · 2019-07-05 03:35

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.

查看更多
登录 后发表回答