Unexpected ILLEGAL token in CSS merged file

The following error appears in the Chrome console:

Uncaught SyntaxError: Unexpected ILLEGAL Token

At the beginning of my concatenated CSS file:

@import url("http://fonts.googleapis.com/css?family=Raleway:300,400,600") 

This line ends by itself, and it is this line that throws the error:

enter image description here

I looked around and it seems that this error should apply to invisible characters breaking into the code. Unfortunately, in my case, this does not seem to be true. I even deleted this part of the code and rewrote it manually to make sure - no difference.

I use Stylus (with gulp) and the resulting compiler naturally causes an error - maybe this is a problem with gulp-stylus? I looked at the compiled code and cannot find any invisible characters there ...

Anything else throw this error?

+6
source share
1 answer

The error implies that you are trying to load a stylesheet using <script> instead of <link rel=stylesheet> .

CSS is not JavaScript and cannot be considered as such.

+11
source

All Articles