Skip to content

Bug fix in calc parsing when the first operand is a negative value #140

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

Merged
merged 2 commits into from
Aug 29, 2018

Conversation

raxbg
Copy link
Contributor

@raxbg raxbg commented Aug 21, 2018

These changes fix issues with rules like calc(-120% - 4px) and calc(8px + -50%)

@sabberworm
Copy link
Collaborator

Thanks. Can you also test for nested calcs? Both with braces or calc functions?

.test {
  font-size: calc((3 * 4px) + -2px);
  top: calc(200px - calc(20 * 3px));
}

@raxbg
Copy link
Contributor Author

raxbg commented Aug 29, 2018

I remember that I tested these cases while I was working on the changes, but I must have forgotten to add unit tests for them. Should be ok now.

@sabberworm sabberworm merged commit 8b21a4c into MyIntervals:master Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants