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

Unexpected results for lighten and darken functions #2294

Closed
matt-cooper opened this issue Jan 12, 2017 · 2 comments
Closed

Unexpected results for lighten and darken functions #2294

matt-cooper opened this issue Jan 12, 2017 · 2 comments

Comments

@matt-cooper
Copy link

matt-cooper commented Jan 12, 2017

input.scss

.test-case {
  color: lighten(#333333, 10%);
  background-color: darken(#4d4d4d, 10%);
}

Existing behavior

Using:

  node-sass 3.13.1
  libsass   3.3.6

Expected output (matches SassMeister v3.4.21):

.test-case {
  color: #4d4d4d;
  background-color: #343434; }

New and unexpected behavior

Using:

  node-sass 4.2.0
  libsass   3.4.3

Unexpected output:

.test-case {
  color: #4d4c4c;
  background-color: #343333; }
@mgreter
Copy link
Contributor

mgreter commented Jan 18, 2017

This is probably related to #2256. I have closed the previous issue report, since there is not much we can do about this. But I'll keep this open, as there maybe is a way to get this more closely to the original ruby sass implementation. Afterall the differences between those two colors are so minimal that probably nobody could make out a difference by eye anyway, so this is not a high prio issue.

@mgreter
Copy link
Contributor

mgreter commented Jan 11, 2018

Closing as insignificant. The math for rounding floats can be tricky and I would argue that no human can really tell the difference between #343434 and #343333.

@mgreter mgreter closed this as completed Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants