Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error message for @layer between @imports #803

Open
sapphi-red opened this issue Aug 21, 2024 · 0 comments
Open

Incorrect error message for @layer between @imports #803

sapphi-red opened this issue Aug 21, 2024 · 0 comments

Comments

@sapphi-red
Copy link

sapphi-red commented Aug 21, 2024

The following CSS is invalid as the @import is not consecutive.

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@100;200;300;400;500;600;700&display=swap');

@layer reset, base, variant, state, component;

@import url(./tester.css) layer(base);

Reproduction

If this CSS is input, lightningcss errors with the following message:

@import rules must precede all rules aside from @charset and @layer statements

This message is true, but doesn't apply to this input. @import does precede all other statements aside from @layer.
In this case, I think the error message needs to be something like "@import must be consecutive".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant