-
Notifications
You must be signed in to change notification settings - Fork 9
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
insertColons option: "preserve" mode for accessing nested variables #79
Comments
I understand the problem, but can you give me some context of |
There is no such case when However Stylus itself does compile it as a selector, because he cannot discriminate between a nested variable access and a selector (see the above linked issue and its following comments). When we format our stylus code, we use stylus supremacy |
@ThisIsManta any update on this Issue ? |
I have done a PR #82 to cover the needs |
Thanks for the PR, but I have to reject it as I came up with different solution. See my explanation at #82 (comment) |
Greetings,
In the light of this Stylus issue stylus/stylus#2357, accessing a nested variable can be ambiguous without colon, e.g.
is considered as a CSS selector, while:
is considered as a CSS property.
However, stylus supremacy
insertColons
option is a Boolean so only offers a toggle mode: with or without colons. In all our codebase we don't want to use colons, but only in the case when accessing nested variables.Stylus supremacy
insertColons
should provide a "preserve" mode which does not affect at all the way the developer used colons or not. That is,insertColons
as a String with three possible values:"preserve"
,"always"
,"none"
.I've looked into the code but I am not quite sure how to do it so I cannot make a PR for that.
Please tell me what do you think about this proposition.
The text was updated successfully, but these errors were encountered: