Skip to content

Problem with removed parenthesis from calc before var #113

Closed
@shrpne

Description

Original issue cssnano/cssnano#645

This valid css

--aspect-ratio: 16/9;
padding-top: calc(100% / (var(--aspect-ratio)));

becomes invalid after cssnano compilation, because cssnano removes parenthesis around of var()

Chrome and Firefox don't respect the var() without parenthesis around it and so the code is not working as expected.

Test case: https://jsfiddle.net/z7bsn1r8/4/

Metadata

Assignees

No one assigned

    Labels

    bad-outputpostcss-calc produces incorrect outputbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions