Skip to content

Number comparison is different to ruby sass #590

@xzyfer

Description

@xzyfer

I've was looking the current failing specs and noticed a common theme of broken number comparisons. A bunch of outstanding bugs boil down to the following evaluating to true in ruby sass and false in libsass.

a { 
  a: 1/2;
  b: 0.5;
  c: (1/2);
  d: 1/2 == 0.5;
  e: (1/2) == 0.5;
}

Output in Sass 3.4

a {
  a: 1/2;
  b: 0.5;
  c: 0.5;
  d: true;
  e: true; }

Output in Libsass 3.0.0

a {
  a: 1/2;
  b: 0.5;
  c: 0.5;
  d: false;
  e: true; }

Specs added sass/sass-spec#137.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions