Tom-Bonnike/netlify-plugin-inline-critical-css

"unknown rule" with prism.css

Closed this issue · 2 comments

Hi, When trying to run on prism.css I get an error:

────────────────────────────────────────────────────────────────
11:03:59 AM:   Plugin "netlify-plugin-inline-critical-css" failed            
11:03:59 AM: ────────────────────────────────────────────────────────────────
11:03:59 AM: ​
11:03:59 AM:   Error message
11:03:59 AM:   CssSyntaxError: Failed to inline critical CSS.
11:03:59 AM:   /static/lib/prism/prism.min.css:1:1828: Unknown word

Here's a link to the file it crashed on:

https://60a3d07b77d0cc000701018c--gallant-ptolemy-d1eb76.netlify.app/static/lib/prism/prism.min.css

There’s some weird DOWNLOAD CSS text at the end of the CSS file you linked. It’s invalid CSS and that’s why postcss fails to parse it. You can try the parsing here. Removing that text makes it work.

Thanks, I should have caught that :)