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

Issue with minifying not pseudo-class alongside using selector inside it #1175

Closed
amerllica opened this issue Jul 10, 2021 · 1 comment
Closed

Comments

@amerllica
Copy link

Explanation

I have searched and didn't find this bug and its solution. I'm using html-minifier-terser and this bug happened inside it, this library is using clean-css version 4.2.3 and inside this when we are using *:not(div *) selector, after minifying it transform to this *:not(div*) and because div* --there is no space between v and *-- has no meaning for any kind of browsers, whole the css system faced error and no css is existed in system.

  • finally, be nice and have fun!

Environment

  • clean-css version - npm ls clean-css: 4.2.3
  • node.js version - node -v: 16.3.0
  • operating system: macOS big sur

Configuration options

var CleanCSS = require('clean-css');
new CleanCSS({});

No config. all configuration is on default settings.

Input CSS

*:not(div *) {
  color: red;
}

Actual output CSS

:not(div*){color:red}

Expected output CSS

:not(div *){color:red}
@amerllica
Copy link
Author

I tested the version 5.1.3 and this issue is fixed in this version.

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

No branches or pull requests

1 participant