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

Implement rounding precision #1704

Merged
merged 1 commit into from
Jan 13, 2016
Merged

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Nov 6, 2015

Should pass sass/sass-spec#696

Update rounding behavior for upcoming ruby sass 3.4.20.

My implementation should return the same results but avoids the fmod division operation.
We may also want to calculate the epsilon only once at startup and store it in options.

@xzyfer
Copy link
Contributor

xzyfer commented Nov 6, 2015

Let's leave this until sass spec is 3.4.20/ready. I assume there's a test
case for this new behaviour?
On 7 Nov 2015 12:03 am, "Marcel Greter" [email protected] wrote:

Update rounding behavior for upcoming ruby sass 3.4.20
sass/sass#1883.

My implementation should return the same results but avoids the fmod
division operation.
We may also want to calculate the epsilon only once at startup and store

it in options.

You can view, comment on, or merge this pull request online at:

#1704
Commit Summary

  • Fix static value parsing for numbers with units
  • Implement precision for Sass::round function

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#1704.

@mgreter
Copy link
Contributor Author

mgreter commented Nov 7, 2015

As confirmed by ruby sass dev team, this was a bug. Not sure why we should withold a bugfix that doesn't affect our spec tests! We have a lot of other edges that are not 100% compatible with ruby sass output. It does not break existing spec tests, so for me this is ready to be merged!
As for the tests, we currently don't support tests with custom (precision) options!

@mgreter mgreter added this to the 3.3.2 milestone Nov 7, 2015
@mgreter mgreter self-assigned this Nov 7, 2015
@saper
Copy link
Member

saper commented Nov 7, 2015

Is precision a user-defined option in ruby sass as well?

@mgreter
Copy link
Contributor Author

mgreter commented Nov 7, 2015

Yes it is.

@xzyfer xzyfer modified the milestones: 3.3.2, 3.3.3 Nov 13, 2015
mgreter added a commit that referenced this pull request Jan 13, 2016
@mgreter mgreter merged commit 86cb2e7 into sass:master Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants