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

4.2.2 breaking bug - mal search pattern for replacing rgba to hexdecimal #1106

Closed
miao-yu opened this issue Jan 28, 2020 · 3 comments · May be fixed by arichbart/madness2017#6
Closed

4.2.2 breaking bug - mal search pattern for replacing rgba to hexdecimal #1106

miao-yu opened this issue Jan 28, 2020 · 3 comments · May be fixed by arichbart/madness2017#6

Comments

@miao-yu
Copy link

miao-yu commented Jan 28, 2020

The css I have:
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(30,87,153,1)), color-stop(50%,rgba(41,137,216,1)), color-stop(51%,rgba(32,124,202,1)), color-stop(100%,rgba(125,185,232,1)));

The css compiled after by 4.2.2, ')' missing.
background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#1e5799,color-stop(50%,#2989d8,color-stop(51%,#207cca,color-stop(100%,#7db9e8);

@jakubmazanec
Copy link

I was just going to report the same issue (version 4.2.2).

Example code:

let fs = require('fs');
let CleanCSS = require('clean-css');
let output = new CleanCSS().minify(`
.foo {
  background-image: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
}
`);

fs.writeFileSync('./output.css', output.styles);

Output:

.foo{background-image:linear-gradient(to right,rgba(255,255,255,0),#fff;pointer-events:none}

Expected output:

.foo{background-image:linear-gradient(to right,rgba(255,255,255,0),#fff);pointer-events:none}

@jakubpawlowicz
Copy link
Collaborator

Sorry for trouble, will fix shortly.

@jakubpawlowicz
Copy link
Collaborator

4.2.3 is out with the fix.

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