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

Properly hydrate numbers after operations in variable assignments #797

Merged
merged 1 commit into from
Jan 3, 2015

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Jan 1, 2015

This PR fixes an issue where a number variable's units would be mangled after a binary operation i.e. *, /.

I've also updated the number validity check and error message to be more inline with Ruby sass.

Fixes #783. Specs added sass/sass-spec#216.

@xzyfer xzyfer force-pushed the fix/op-number-units branch from 02e31ac to d55c9c2 Compare January 1, 2015 07:53
@am11
Copy link
Contributor

am11 commented Jan 1, 2015

👍

@xzyfer, (just curious) what about those commented lines in the test? Are they part of the spec?

@xzyfer
Copy link
Contributor Author

xzyfer commented Jan 1, 2015

Those lines cause errors which we cannot assert yet. I've left them in with
the appropriate error message for when we can.
On 2 Jan 2015 06:33, "Adeel Mujahid" notifications@github.com wrote:

[image: 👍]

@xzyfer https://github.com/xzyfer, (just curious) what about those
commented lines in the test? Are they part of the spec?


Reply to this email directly or view it on GitHub
#797 (comment).

@am11
Copy link
Contributor

am11 commented Jan 1, 2015

Awesome! Apparently, number theory is (also) becoming a strong suit of libsass. 😎

On a separate note, would be nice if you guys can setup gitter (like node-sass channel there: https://gitter.im/sass/node-sass), so peeps can throw in questions, which you guys can answer later. IRC is another way to go. :)

PS: We have a badge for gitter in README as well: https://github.com/sass/node-sass/blob/master/README.md

@xzyfer xzyfer added this to the 3.2 milestone Jan 3, 2015
@xzyfer xzyfer force-pushed the fix/op-number-units branch from d55c9c2 to a2bb99f Compare January 3, 2015 08:57
@xzyfer xzyfer force-pushed the fix/op-number-units branch from a2bb99f to 8b399d1 Compare January 3, 2015 09:02
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 8b399d1 on xzyfer:fix/op-number-units into 9087a77 on sass:master.

@xzyfer xzyfer changed the title [3.1.next] Properly hydrate numbers after operations in variable assignments Properly hydrate numbers after operations in variable assignments Jan 3, 2015
xzyfer added a commit that referenced this pull request Jan 3, 2015
Properly hydrate numbers after operations in variable assignments
@xzyfer xzyfer merged commit 5045bce into sass:master Jan 3, 2015
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.

px/em unit calculations outputting incorrect units.
3 participants