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

@import statement on the bottom were removed #456

Closed
Chen-jj opened this issue Jun 30, 2022 · 1 comment
Closed

@import statement on the bottom were removed #456

Chen-jj opened this issue Jun 30, 2022 · 1 comment

Comments

@Chen-jj
Copy link

Chen-jj commented Jun 30, 2022

result in csso v5.0.3

image

However in csso v4.2.0 the @import was keeped.

@lahmatiy
Copy link
Member

That's not a bug. According to CSS Cascading and Inheritance:

Any @import rules must precede all other valid at-rules and style rules in a style sheet (ignoring @charset), or else the @import rule is invalid.

So, CSSO correctly removed invalid @import here. Just double check v4.2.0, it produces the same result for your example as v5.0.3.

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

2 participants