Re: [w3c/webcomponents] define behavior of `@import` in Cascading Style Sheet (CSS) modules (#870)

I think my main argument for making it not error is that that's how most other CSS errors work, in particular parser errors and other kind of "syntax that doesn't (yet, maybe) work", like unknown at-rules and such. In particular, if someone writes syntax that right now isn't accepted by the parser and we later start accepting it, we'd start throwing, which seems bad.

After a bit of testing, browsers seem to be very lenient with `@import` syntax (which I don't think is really correct per spec, fwiw...). For example I would've expected the syntax `@import "url" supports(display: grid);` to get ignored (because it's not implemented yet in browsers), but instead it just gets treated as `@import "url" not all;`.

That alleviates a bit my concern, though it is still a problem with other things we want to do with `@import` / url functions, like `@import url("foo.css" crossorigin);`, for example, which was discussed not too long ago. Thus, I still think not throwing is the consistent thing to do.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/870#issuecomment-719119713

Received on Friday, 30 October 2020 01:45:56 UTC