Inconsitent output for numbers near zero in compressed mode #1931

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

Comments

Projects
None yet
2 participants
@mgreter

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

This comment has been minimized.

Show comment
Hide comment
@mgreter

mgreter 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)}

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)}

@mgreter mgreter referenced this issue in sass/libsass Dec 13, 2015

Closed

Refactor/sass 3.4.21 #1788

@chriseppstein

This comment has been minimized.

Show comment
Hide comment
@chriseppstein

chriseppstein Dec 14, 2015

Member

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.

Member

chriseppstein commented Dec 14, 2015

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