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

Inconsitent output for numbers near zero in compressed mode #1931

Closed
mgreter opened this issue Dec 12, 2015 · 2 comments
Closed

Inconsitent output for numbers near zero in compressed mode #1931

mgreter opened this issue Dec 12, 2015 · 2 comments

Comments

@mgreter
Copy link

mgreter commented Dec 12, 2015

This is against latest ruby sass 3.4.20
sass-spec/misc/negative_numbers

a {
  near: (0.000001);
  plus: (+ 0.0000001);
  minus: (- 0.0000001);
  near: (0 - 0.0000001);
  near: (0.0000001 * -1);
}

Results in

a{near:.0;plus:0;minus:0.0;near:.0;near:.0}

It should output .0 instead of 0.0 also for the unary negation operation in compressed mode.

@mgreter
Copy link
Author

mgreter commented Dec 13, 2015

Another related issue:
libsass-closed-issues/issue_550/operator

$x: .03;
$y: 0.7;

#foo {
  color: saturate($x);
  color: saturate($y);
  filter: grayscale(.03);
  filter: grayscale(0.7);
}

Results in

#foo{color:saturate(.03);color:saturate(.7);filter:grayscale(0.03);filter:grayscale(0.7)}
@chriseppstein
Copy link

The output should be:

a{near:0;plus:0;minus:0;near:0;near:0}

While testing this, I discovered issue #1938.

I'm going to file a separate issue to track the numeric output differences of the filter functions -- it's not the same root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants