-
Notifications
You must be signed in to change notification settings - Fork 353
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
Add support for arbitrary modifiers after @import #1695
Conversation
6cc90d9
to
3bd4b0f
Compare
@@ -21,5 +21,8 @@ class SupportsAnything implements SupportsCondition { | |||
|
|||
SupportsAnything(this.contents, this.span); | |||
|
|||
Interpolation toInterpolation() => | |||
Interpolation.concat(['(', contents, ')'], span); |
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.
is it actually equivalent in case a CalculationExpression is present in it ? We have a special handling for calculations in supports conditions, that would be lost here.
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.
Ah, good catch. Instead of converting these to interpolation, I've added an expression-level AST node just for this.
whitespace(); | ||
} else { | ||
whitespace(); | ||
if (scanner.scanChar($comma)) { |
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.
This support for comma looks incompatible with using the comma as separator between multiple ImportArgument.
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.
This actually exists to match the previous behavior: because MediaQueryList
can contain commas at nearly any point, you could already write @import "..." foo, bar, baz
. This just makes it more explicit.
See sass/sass#3285
See sass/sass#3290
See sass/sass-spec#1787