-
Notifications
You must be signed in to change notification settings - Fork 93
Tests for fix to crash when mixin @import and @use #2060
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's also worth testing the meta.load-css()
equivalent to the nested import case, since that should produce an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that:
.foo {
@include meta.load-css('upstream');
}
Should throw an error, when this does not?
.foo {
@import 'upstream';
}
Because it actually throws an error, but I don't think it should 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but if it should, then we're all set :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should. meta.load-css()
loads the module as a module, which means that its CSS is generated context-independently and only afterwards injected into the document. A stylesheet loaded as a module shouldn't allow top-level declarations, because that's not valid CSS.
3ef0074
to
327f20f
Compare
327f20f
to
8669955
Compare
[skip dart-sass]