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

Assigning elements from a stylus hash adds a set of parentheses on each save #638

Closed
nachocab opened this issue Jan 14, 2018 · 4 comments
Closed

Comments

@nachocab
Copy link

nachocab commented Jan 14, 2018

<style lang="stylus" scoped>
$abc = {
  one: 1,
  two: 2
}
$abc[three] = $abc.one + 2 // 👎  becomes: $abc[three] = ($abc.one + 2)
$abc.four = $abc[two] + 2 // 👎 becomes: $abc.four = ($abc[two] + 2)
$abc[five] = 2 + 3 // 👍 nothing gets added
$abc.six = 6 // 👍 nothing gets added 
</style>

Each time you save, a new set of parentheses gets added. Eventually you might end up with something like $abc[three] = ((((((((((((($abc.one + 2)))))))))))))

@nachocab
Copy link
Author

Also, the same happens when adding multiple box shadows (separated by commas):

box-shadow: inset 0 -9px 0 ((($color.blue))), inset 0 9px 0 ((($color.blue)))

@HerringtonDarkholme
Copy link
Member

cc @ThisIsManta

I cannot reproduce @nachocab 's report, but I do find other glitch.

Before:
screen shot 2018-01-15 at 2 30 43 pm

After:
screen shot 2018-01-15 at 2 30 49 pm

@ThisIsManta
Copy link
Contributor

Thanks for letting me know. I'll check this out after my vacation.

ThisIsManta added a commit to ThisIsManta/stylus-supremacy that referenced this issue Jan 18, 2018
ThisIsManta added a commit to ThisIsManta/stylus-supremacy that referenced this issue Jan 18, 2018
@ThisIsManta
Copy link
Contributor

This should be fixed by #659

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants