Skip to content

Missing unit after 0 #28

Closed
Closed
@dennisfrank

Description

@dennisfrank

I use postcss-calc in cssnano and calc(50% - 50vw + (100vw - 100vw) / 2 + 1em) gets optimized to calc(50% - 50vw + 0 / 2 + 1em). Unfortunately, the unit after 0 is missing and the browser does not calculate the calc()statement.

calc(50% - 50vw + 0vw / 2 + 1em) would be the correct optimization.

Or even better: calc(50% - 50vw + 1em)

0 vs 0+ unit.

(If you wonder why I calculate 100vw - 100vw: it’s been generated by a Sass mixin and in most cases it makes more sense.)

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