Skip to content

Incorrect calc reduction of 0 - (A - B) / C #88

@bakkerjoeri

Description

@bakkerjoeri

Given the following CSS:

left: calc(0px - (100vw - 10px) / 2);

Which I expect to become:

left: calc((-100vw - - 10px) / 2);

Actually becomes the mathematically incorrect:

left: calc((-100vw - - 10px) / -2);

Calculations with the structure 0 - (A - B) / C are incorrectly reduced to (-A - -B) - C while the correct solve is (-A - -B) / C.

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