grunt-contrib-less icon indicating copy to clipboard operation
grunt-contrib-less copied to clipboard

banner not placed at top of file when using @import

Open boneskull opened this issue 10 years ago • 1 comments

@import is (rightly) being treated as a special case: this statement will appear as the first line in the generated CSS file.

However, if a banner is specified, it's inserted even before that.

But as I understand, @import needn't come before any other lines in the .css file; it must simply come before other styles.

Example

Given .less:

@import url('//fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,700');
body {
  color: red;
}

And banner option:

"/* it's a banner */"

The resulting .css file will look like:

@import url('//fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,700');
/* it's a banner */
body {
  color: red;
}

This happens regardless of whether compress is set.

boneskull avatar Mar 25 '15 20:03 boneskull

Does this happen with v1.4.0 and/or less itself?

XhmikosR avatar Aug 02 '16 07:08 XhmikosR