2

I have a basic scss file that contains (among other things) this:

@keyframes fade{
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@-moz-keyframes fade{
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@-webkit-keyframes fade{
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

@-ms-keyframes fade{
    0%   { opacity: 0; }
    100% { opacity: 1; }
}​
    // <--- Error thrown on this line
@-o-keyframes fade{
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

When trying to compile, I get an invalid top level expression on the line that I indicated in my code above. Okay, so I tried removing the following code:

@-ms-keyframes fade{
    0%   { opacity: 0; }
    100% { opacity: 1; }
}​

And now it compiles just fine. Why would sass have an issue with this block of code? I'm using node-sass (libsass 3.2).

Jake Wilson
  • 88,616
  • 93
  • 252
  • 370

1 Answers1

1

I think you may have copy pasted an accidental character in your SASS or someone is purposely messing with you. Your SASS compiles perfectly fine on SassMeister with Libsass 3.1.0. Notice however if you copy paste your code snippet into SassMeister, you get this weird unknown character right where the error is thrown. Upon further inspection there was a &#8203; entity in your code snippet on here. So... That's either an SO bug or an accidental copy paste.

...please tell I'm not insane.

HTML Entity

allejo
  • 2,076
  • 4
  • 25
  • 40