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

Empty output if css class contains double dash (--) and a comment at the beginning #1224

Closed
ollm opened this issue Jun 15, 2022 · 2 comments
Closed
Labels

Comments

@ollm
Copy link

ollm commented Jun 15, 2022

Environment

  • clean-css version - master clean-css@5.3.0 (git+https://github.com/clean-css/clean-css.git#40ca65807639e0470dab22585847a7582687167f):
  • node.js version - v14.19.3
  • operating system Ubuntu 20.04.3

Configuration options

var CleanCSS = require('clean-css');
var output = new CleanCSS({
  level: 2 // But it also happens with level 1
}).minify(css)

Not works

Input CSS

.commentRatingColor--chartreuse
{
	/* Comment */
	color: #5ab900;
}

Actual output CSS

empty

Expected output CSS

.commentRatingColor--chartreuse{color:#5ab900}

Works

.commentRatingColor--chartreuse
{
	color: #5ab900;
	/* Comment */
}

Actual output CSS

.commentRatingColor--chartreuse{color:#5ab900}
@jakubpawlowicz
Copy link
Collaborator

Looks like parsing is off. I'll fix it.

@jakubpawlowicz
Copy link
Collaborator

The fix is out in 5.3.2.

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