lightningcss icon indicating copy to clipboard operation
lightningcss copied to clipboard

/* ERROR: Unexpected token Semicolon */ (IE hacks 5-7)

Open PanSom opened this issue 1 year ago • 2 comments

A bug on hacks from the time of the dinosaurs. Yes I realise all this myself, but I had to work with creepy legacy and what's creepy is that I used to write it myself. But that's not the point.

The point is that lightningcss reports errors in css lines like this.

p {
  border:1px solid green; /* works in all */
  *border:1px solid red; /* targets IE6 and 7 */
  _border:1px solid blue; /* targets IE6 */
}

Again, I get it. It's no longer about supporting such ancient browsers. But if such an ancient css lib comes across, I wouldn't want it to crash on such lines.

PanSom avatar Jun 28 '24 01:06 PanSom

Please see the docs for the error recovery option. https://lightningcss.dev/docs.html#error-recovery

devongovett avatar Jun 28 '24 02:06 devongovett

Thanks, I wasn't paying attention.

PanSom avatar Jun 28 '24 03:06 PanSom