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

Error parsing properties starting with operator (-/+) #535

Closed
AndyOGo opened this issue Oct 13, 2014 · 7 comments · Fixed by #927
Closed

Error parsing properties starting with operator (-/+) #535

AndyOGo opened this issue Oct 13, 2014 · 7 comments · Fixed by #927

Comments

@AndyOGo
Copy link

AndyOGo commented Oct 13, 2014

Unfortunately using - operator in SASS causes this bug.

$width: 10;

.test{
          margin-left: - 54 * $width - 1;
 }

Quick fixed with brackets:

$width: 10;

.test{
          margin-left: - (54 * $width - 1);
 }
@QuLogic
Copy link
Contributor

QuLogic commented Oct 13, 2014

Huh, mathematically speaking, I'd have thought that - was a unary minus and applied to the 54, not the entire expression...

@AndyOGo
Copy link
Author

AndyOGo commented Oct 14, 2014

Well thats exactly my point.

Sorry for my "quick fix" being confusing. This should just expose that build works fine with brackets but not without them.

@xzyfer
Copy link
Contributor

xzyfer commented Oct 15, 2014

This doesn't work in ruby sass 3.4

Confirmed https://gist.github.com/xzyfer/6c396ae79e4de601edc9

Please open the issue on https://github.com/sass/sass

@AndyOGo
Copy link
Author

AndyOGo commented Oct 15, 2014

@xzyfer
Well I know that it works with ruby based SASS parser.

But a soon as try to compile with libsass it fails on that line:(

@xzyfer
Copy link
Contributor

xzyfer commented Oct 16, 2014

@AndyOGo sorry you're correct. I failed at copy-paste.

@xzyfer
Copy link
Contributor

xzyfer commented Oct 29, 2014

Spec added sass/sass-spec#102

@mgreter
Copy link
Contributor

mgreter commented Dec 23, 2014

The basic problem is that either + 0 and - 0 is not parsed correctly. Maybe the spec should be updated to include that case too!? IMHO this could be treated like an op with left hand side set to 0.

mgreter added a commit to mgreter/libsass that referenced this issue Dec 23, 2014
@mgreter mgreter changed the title Warning: ... error: error reading values after : Error parsing properties starting with operator (-/+) Mar 9, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Mar 9, 2015
@mgreter mgreter self-assigned this Mar 9, 2015
@mgreter mgreter added this to the 3.2 milestone Mar 9, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Mar 9, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants