Skip to content

Precision for nested calc is not accurate #66

@andreymal

Description

@andreymal
.foo {
  width: calc(100% / 3 * 3);
  height: calc(calc(100% / 3) * 3);
}

Expected output:

.foo {
  width: 100%;
  height: 100%;
}

Actual output:

.foo {
  width: 100%;
  height: 99.99999%;
}

reduce-css-calc is also affected

Note that it works in Firefox and Chrome:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions