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

Spaces around minus symbol should not be mandatory if first argument is a function call #733

Closed
HugoGiraudel opened this Issue Dec 16, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@HugoGiraudel

HugoGiraudel commented Dec 16, 2014

Related: #535.

Test:

@function getter() {
  @return 42px;
}

foo {
  content: getter()-1;
  content: getter()- 1;
  content: getter() -1;
}

Expect:

foo {
  content: 41px;
  content: 41px;
  content: 42px -1;
}

Result:

foo {
  content: 42px -1;
  content: 41px;
  content: 42px -1;
}

@HugoGiraudel HugoGiraudel changed the title from Spaces around minus symbol should not be mandatory to Spaces around minus symbol should not be mandatory if first argument is a function call Dec 16, 2014

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Dec 16, 2014

Spec added sass/sass-spec#176

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Dec 26, 2014

I've had a quick a look into this. The problem is in the parser.

getter()-1 => list(getter(), -1)
getter()- 1 => getter() - 1
getter() -1 => list(getter(), -1)

@xzyfer

This comment has been minimized.

Contributor

xzyfer commented Dec 26, 2014

I have a fix for this in #733 but I'd prefer to wait til 3.1.0 is stable because it has potential to introduce subtle regressions.

@xzyfer xzyfer modified the milestones: 3.2, 3.next Dec 26, 2014

@xzyfer xzyfer closed this in #767 Jan 3, 2015

@xzyfer xzyfer modified the milestone: 3.next Jan 3, 2015

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