-
Notifications
You must be signed in to change notification settings - Fork 359
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 sass-parser
support for the @use
rule
#2389
Conversation
CHANGELOG.md
Outdated
@@ -1,3 +1,7 @@ | |||
## 1.79.7 |
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.
Not sure if it is intended, 1.79.6 has not been released.
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, thanks
If this would be placed before a string that would continue the escape, it would also continue the identifier itself.
Also add `ConfiguredVariable.raws.name` per recent discussions.
The original names make sense in isolation, but we want them to match our eventual `VarriableDeclaration` class. That class will need to have names that are sufficiently distinctive from the PostCSS `Declaration` type, so these prefigure that naming convention.
There's also a Declaration.variable in PostCSS u_u
comma?: boolean; | ||
|
||
/** | ||
* The whitespace between the final variable (or its trailing comma if it has |
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.
Can there be whitespace between the final variable and the comma? And if so, is that supposed to be stored in the raws for the variable? or for the config?
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's stored in ConfiguredVariableRaws.afterValue
.
} else if (this.defaultNamespace !== this.namespace) { | ||
result += ' as ' + sassInternal.toCssIdentifier(this.namespace); | ||
} |
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.
Assuming that I parse @use 'foo' as foo
, and then do myUse.raws.namespace = 'bar'
so that the RawValue is "invalid".
Should this line still omit producing as foo
?
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, myUse.raws.namespace
is strictly ignored if it doesn't match.
Co-authored-by: Carlos (Goodwine) <2022649+Goodwine@users.noreply.github.com>
Co-authored-by: Carlos (Goodwine) <2022649+Goodwine@users.noreply.github.com>
No description provided.