Skip to content

Incorrect reduction of nested expression #38

@gyoshev

Description

@gyoshev

Reducing the expression calc( (1em - calc( 10px + 1em)) / 2) reduces incorrectly to calc(1em - 5px) (the correct one should be -5px).

A workaround is to add another operation, however this is far from ideal: calc( (1em + (-1 * calc( 10px + 1em))) / 2).

I know the expressions look weird, but these actually are real-world examples from SASS-generated CSS (the inner calc expression is stored in a variable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions