romainmenke / css-import-tests

Tests for at-import in CSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different methods of giving feedback to CSS authors

romainmenke opened this issue · comments

Different tools have different methods of giving feedback and handle errors differently.

PostCSS has a long history of just allowing anything that even remotely looks like CSS and maybe emitting a few warnings. In the end CSS authors will see what sticks in a real browser.

LightningCSS however gives hard errors and refuses to give any output when a small issue is encountered.

I suspect multiple failures at this time for LightningCSS are just the result of this.

This makes it more difficult to test how bundlers handle author mistakes.
Things like placing an @import rule after style rules.

I personally think the approach found in LightningCSS is against the spirit of CSS.

Invalid CSS should be ignored and there should never be hard errors that stop all further processing.

This can and will lead to confusing and hard to debug cases but sticking with the fundamentals of CSS is better in the long run.

Closing this as I am not going to spend time on this particular aspect.