* Moves URL rebasing & rewriting into lib/urls.
* Fixed issue [#436](https://github.com/jakubpawlowicz/clean-css/issues/436) - refactors URI rewriting.
* Fixed issue [#448](https://github.com/jakubpawlowicz/clean-css/issues/448) - rebasing no protocol URIs.
+* Fixed issue [#517](https://github.com/jakubpawlowicz/clean-css/issues/517) - turning off color optimizations.
* Fixed issue [#542](https://github.com/jakubpawlowicz/clean-css/issues/542) - space after closing brace in IE.
[3.2.7 / 2015-05-03](https://github.com/jakubpawlowicz/clean-css/compare/v3.2.6...v3.2.7)
with the following options available:
* `'[+-]colors.opacity'` - - turn on (+) / off (-) `rgba()` / `hsla()` declarations removal
+* `'[+-]properties.colors'` - turn on / off any color optimizations
* `'[+-]properties.iePrefixHack'` - turn on / off IE prefix hack removal
* `'[+-]properties.ieSuffixHack'` - turn on / off IE suffix hack removal
* `'[+-]properties.backgroundSizeMerging'` - turn on / off background-size merging into shorthand
value = zeroDegMinifier(name, value);
value = unitMinifier(name, value, options.unitsRegexp);
}
- value = colorMininifier(name, value, options.compatibility);
+ if (options.compatibility.properties.colors)
+ value = colorMininifier(name, value, options.compatibility);
property[j][0] = value;
}
},
properties: {
backgroundSizeMerging: false, // background-size to shorthand
+ colors: true, // any kind of color transformations, like `#ff00ff` to `#f0f` or `#fff` into `red`
iePrefixHack: false, // underscore / asterisk prefix hacks on IE
ieSuffixHack: false, // \9 suffix hacks on IE
merging: true, // merging properties into one
},
properties: {
backgroundSizeMerging: false,
+ colors: true,
iePrefixHack: true,
ieSuffixHack: true,
merging: false,
},
properties: {
backgroundSizeMerging: false,
+ colors: true,
iePrefixHack: true,
ieSuffixHack: true,
merging: false,
]
}, { compatibility: 'ie8' })
)
+ .addBatch(
+ propertyContext('colors - no optimizations', {
+ 'long hex into short': [
+ 'a{color:#ff00ff}',
+ [['color', '#ff00ff']]
+ ],
+ 'short hex into name': [
+ 'a{color:#f00}',
+ [['color', '#f00']]
+ ],
+ 'name into hex': [
+ 'a{color:white}',
+ [['color', 'white']]
+ ]
+ }, { compatibility: { properties: { colors: false } } })
+ )
.addBatch(
propertyContext('@filter', {
'spaces after comma': [
return new Compatibility({}).toOptions();
},
'gets default options': function(options) {
+ assert.isTrue(options.properties.colors);
assert.isFalse(options.properties.iePrefixHack);
assert.isFalse(options.properties.ieSuffixHack);
assert.isFalse(options.selectors.adjacentSpace);
return new Compatibility('ie8').toOptions();
},
'gets template options': function(options) {
+ assert.isTrue(options.properties.colors);
assert.isTrue(options.properties.iePrefixHack);
assert.isTrue(options.properties.ieSuffixHack);
assert.isFalse(options.selectors.adjacentSpace);
return new Compatibility('ie7').toOptions();
},
'gets template options': function(options) {
+ assert.isTrue(options.properties.colors);
assert.isTrue(options.properties.iePrefixHack);
assert.isTrue(options.properties.ieSuffixHack);
assert.isTrue(options.selectors.ie7Hack);