Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calc fallback removed #1043

Closed
shrpne opened this issue Aug 15, 2018 · 1 comment
Closed

calc fallback removed #1043

shrpne opened this issue Aug 15, 2018 · 1 comment
Labels

Comments

@shrpne
Copy link
Contributor

shrpne commented Aug 15, 2018

Calc fallback removed by clean-css. I assume it should not be removed

Environment

  • clean-css version - npm ls clean-css: 4.2.1
  • node.js version - node -v: 8.9.4
  • operating system: macOS High Sierra 10.13.6

Configuration options

var CleanCSS = require('clean-css');
new CleanCSS({
    level: {
                1: {},
                2: {
                    mergeNonAdjacentRules: false,
                    removeUnusedAtRules: true,
                },
            }
})

Input CSS

transform: translateX(-107%);
transform: translateX(calc(-100% - 20px));

Actual output CSS

transform: translateX(calc(-100% - 20px));

Expected output CSS

transform: translateX(-107%);
transform: translateX(calc(-100% - 20px));
@jakubpawlowicz
Copy link
Collaborator

It's a bug indeed 👍 Please use skipProperties level 2 option until it gets fixed if possible: https://github.com/jakubpawlowicz/clean-css#level-2-optimizations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants