* Fixed issue [#83](https://github.com/GoalSmashers/clean-css/issues/83) - HSL to hex color conversions.
* Fixed issue [#2](https://github.com/GoalSmashers/clean-css/issues/2) - resolving `@import` rules.
* Fixed issue [#80](https://github.com/GoalSmashers/clean-css/issues/80) - quotation in multi line strings.
+* Fixed issue [#92](https://github.com/GoalSmashers/clean-css/issues/92) - uppercase hex to short versions.
0.10.2 / 2013-03-19
==================
['toHex', 'toName'].forEach(function(type) {
var pattern = "(" + Object.keys(CleanCSS.colors[type]).join('|') + ")";
var colorSwitcher = function(match, prefix, colorValue, suffix) {
- return prefix + CleanCSS.colors[type][colorValue] + suffix;
+ return prefix + CleanCSS.colors[type][colorValue.toLowerCase()] + suffix;
};
- replace(new RegExp("([ :,\\(])" + pattern + "([;\\}!\\) ])", 'g'), colorSwitcher);
- replace(new RegExp("(,)" + pattern + "(,)", 'g'), colorSwitcher);
+ replace(new RegExp("([ :,\\(])" + pattern + "([;\\}!\\) ])", 'ig'), colorSwitcher);
+ replace(new RegExp("(,)" + pattern + "(,)", 'ig'), colorSwitcher);
});
// replace font weight with numerical value
'p{color:#f00}',
'p{color:red}'
],
+ 'upper case hex value to color name if shorter': [
+ 'p{color:#F00}',
+ 'p{color:red}'
+ ],
+ 'upper case long hex value to color name if shorter': [
+ 'p{color:#FF0000}',
+ 'p{color:red}'
+ ],
'hex value to color name in borders': [
'p{border:1px solid #f00}',
'p{border:1px solid red}'