Fixes new property optimizer for 'none' values.
authorJakub Pawlowicz <jakub@goalsmashers.com>
Sat, 14 Jun 2014 08:01:16 +0000 (09:01 +0100)
committerJakub Pawlowicz <jakub@goalsmashers.com>
Sat, 14 Jun 2014 08:01:16 +0000 (09:01 +0100)
History.md
lib/properties/validator.js
test/unit-test.js

index 2734b17..3634e51 100644 (file)
@@ -1,3 +1,8 @@
+[2.2.1 / 2014-xx-xx](https://github.com/GoalSmashers/clean-css/compare/v2.2.0...2.2.1)
+==================
+
+* Fixes new property optimizer for 'none' values.
+
 [2.2.0 / 2014-06-11](https://github.com/GoalSmashers/clean-css/compare/v2.1.8...2.2.0)
 ==================
 
index 6e12905..b2a697f 100644 (file)
@@ -7,7 +7,7 @@ module.exports = (function () {
   var cssFunctionNoVendorRegexStr = '[A-Z]+(\\-|[A-Z]|[0-9])+\\(([A-Z]|[0-9]|\\ |\\,|\\#|\\+|\\-|\\%|\\.)*\\)';
   var cssFunctionVendorRegexStr = '\\-(\\-|[A-Z]|[0-9])+\\(([A-Z]|[0-9]|\\ |\\,|\\#|\\+|\\-|\\%|\\.)*\\)';
   var cssFunctionAnyRegexStr = '(' + cssFunctionNoVendorRegexStr + '|' + cssFunctionVendorRegexStr + ')';
-  var cssUnitAnyRegexStr = '(' + cssUnitRegexStr + '|' + cssFunctionNoVendorRegexStr + '|' + cssFunctionVendorRegexStr + ')';
+  var cssUnitAnyRegexStr = '(none|' + cssUnitRegexStr + '|' + cssFunctionNoVendorRegexStr + '|' + cssFunctionVendorRegexStr + ')';
 
   var backgroundRepeatKeywords = ['repeat', 'no-repeat', 'repeat-x', 'repeat-y', 'inherit'];
   var backgroundAttachmentKeywords = ['inherit', 'scroll', 'fixed', 'local'];
index 00d4e12..bd8682b 100644 (file)
@@ -1759,6 +1759,7 @@ title']{display:block}",
       '.t{border-top-left-radius:7px;border-bottom-right-radius:6px;border-bottom-left-radius:5px;border-top-right-radius:3px}',
       '.t{border-radius:7px 3px 6px 5px}'
     ],
+    'shorthand border-radius none': 'li{border-radius:none}',
     'shorthand list-style #1': [
       '.t{list-style-type:circle;list-style-position:outside;list-style-image:url(aaa)}',
       '.t{list-style:circle url(aaa)}'