From: Jakub Pawlowicz Date: Sat, 14 Jun 2014 08:01:16 +0000 (+0100) Subject: Fixes new property optimizer for 'none' values. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b8c437f59bb20d481c56aacb65f594437d22eef7;p=clean-css.git Fixes new property optimizer for 'none' values. --- diff --git a/History.md b/History.md index 2734b17d..3634e51a 100644 --- a/History.md +++ b/History.md @@ -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) ================== diff --git a/lib/properties/validator.js b/lib/properties/validator.js index 6e12905c..b2a697fd 100644 --- a/lib/properties/validator.js +++ b/lib/properties/validator.js @@ -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']; diff --git a/test/unit-test.js b/test/unit-test.js index 00d4e126..bd8682bd 100644 --- a/test/unit-test.js +++ b/test/unit-test.js @@ -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)}'