* Fixed issue [#895](https://github.com/jakubpawlowicz/clean-css/issues/895) - ignoring specific styles.
* Fixed issue [#947](https://github.com/jakubpawlowicz/clean-css/issues/947) - selector based filtering.
+[4.1.5 / 2017-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v4.1.4...4.1)
+==================
+
+* Fixed issue [#945](https://github.com/jakubpawlowicz/clean-css/issues/945) - hex RGBA colors in IE filters.
+
[4.1.4 / 2017-06-14](https://github.com/jakubpawlowicz/clean-css/compare/v4.1.3...v4.1.4)
==================
.replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/g, function (match, hue, saturation, lightness) {
return shortenHsl(hue, saturation, lightness);
})
- .replace(/(^|[^='"])#([0-9a-f]{6})/gi, function (match, prefix, color) {
+ .replace(/(^|[^='"])#([0-9a-f]{6})($|[^0-9a-f])/gi, function (match, prefix, color, suffix) {
if (color[0] == color[1] && color[2] == color[3] && color[4] == color[5]) {
- return (prefix + '#' + color[0] + color[2] + color[4]).toLowerCase();
+ return (prefix + '#' + color[0] + color[2] + color[4]).toLowerCase() + suffix;
} else {
- return (prefix + '#' + color).toLowerCase();
+ return (prefix + '#' + color).toLowerCase() + suffix;
}
})
.replace(/(^|[^='"])#([0-9a-f]{3})/gi, function (match, prefix, color) {
'uppercase hex to lowercase hex': [
'a{color:#FFF}',
'a{color:#fff}'
+ ],
+ '4-value hex': [
+ '.block{color:#0f0a}',
+ '.block{color:#0f0a}'
+ ],
+ '8-value hex': [
+ '.block{color:#00ff0080}',
+ '.block{color:#00ff0080}'
]
}, { level: 1 })
)
]
}, { level: 1, compatibility: 'ie8' })
)
+ .addBatch(
+ optimizerContext('colors - ie7 compatibility', {
+ '8-value hex in gradient': [
+ '.block{filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr= #66000000, endColorstr= #66000000)}',
+ '.block{filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr=#66000000, endColorstr=#66000000)}'
+ ]
+ }, { level: 1, compatibility: 'ie7' })
+ )
.addBatch(
optimizerContext('colors - no optimizations', {
'long hex into short': [