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

gradient color value will be optimized in the filter #945

Closed
chengwb53 opened this issue May 12, 2017 · 3 comments
Closed

gradient color value will be optimized in the filter #945

chengwb53 opened this issue May 12, 2017 · 3 comments
Labels
Milestone

Comments

@chengwb53
Copy link

Precheck

  • Do a quick search and make sure a bug has not yet been reported;
  • do a quick check if the bug still exists in the latest patch version;
  • finally, be nice and have fun!

Environment

  • clean-css version - npm ls clean-css:
  • node.js version - node -v:
  • operating system:

Configuration options

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

Input CSS

/* the shorter the better! */
filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr=#66000000, endColorstr=#66000000)}

Actual output CSS

filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr=#60000, endColorstr=#60000)}

Expected output CSS

filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr=#66000000, endColorstr=#66000000)}
@chengwb53
Copy link
Author

but we can resolve it use this options:
new CleanCSS({
compatibility: 'ie7,-properties.colors'
})

@jakubpawlowicz
Copy link
Collaborator

@chengwubin this is odd indeed - what's the 8-value hex? Is it #RRGGBBAA (a for alpha)?

jakubpawlowicz added a commit that referenced this issue Jun 28, 2017
Why:

* MS filters support hex RGBA colors and we were not matching correctly
  against them.
jakubpawlowicz added a commit that referenced this issue Jun 29, 2017
Why:

* IE filters support hex RGBA colors and we were not matching correctly
  against them.
@jakubpawlowicz jakubpawlowicz added this to the 4.1.5 milestone Jun 29, 2017
@jakubpawlowicz
Copy link
Collaborator

Fixed in 4.1.5.

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