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

Issue with variable in parentheses #1317

Closed
tremby opened this issue Jan 4, 2014 · 3 comments
Closed

Issue with variable in parentheses #1317

tremby opened this issue Jan 4, 2014 · 3 comments
Labels

Comments

@tremby
Copy link

tremby commented Jan 4, 2014

I'm not sure if this is the same as or similar to #1051 or #279 (at least parts of it are).

I have

$var = 212px
div
    margin-left -$var
    margin-right -($var)
    margin-top (-$var)
    margin-bottom (- $var)

and I get

div {
  margin-left: -$var;
  margin-right: -212px;
  margin-top: -$var;
  margin-bottom: -212px;
}

I understand that at least the margin-left line is to do with the bugs mentioned above, but the others surprise me. Especially the fact that adding a space to the margin-top line to get the margin-bottom line makes the variable get noticed.

@Panya
Copy link
Member

Panya commented Jan 4, 2014

Yes this is strange, but - is a part of the valid ident token (-$var is a valid variable name, because in Stylus we can declare variables either with or without $, and rules for the properties (like -webkit-foo) is the same as for variables).

@Panya
Copy link
Member

Panya commented Jan 4, 2014

Actually this is duplicate of #980.

@Panya Panya closed this as completed Jan 4, 2014
@tremby
Copy link
Author

tremby commented Jan 4, 2014

True. Thank you.

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

No branches or pull requests

2 participants