From: Jakub Pawlowicz Date: Sun, 29 Jun 2014 20:57:12 +0000 (+0100) Subject: Shortens `border-radius` addFourValueShorthand calls. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=88444ec1ef03a55d1137d261199a59d982263c80;p=clean-css.git Shortens `border-radius` addFourValueShorthand calls. --- diff --git a/lib/properties/processable.js b/lib/properties/processable.js index 301138f9..29a6077d 100644 --- a/lib/properties/processable.js +++ b/lib/properties/processable.js @@ -718,44 +718,16 @@ module.exports = (function () { } }; - addFourValueShorthand('border-radius', [ - 'border-top-left-radius', - 'border-top-right-radius', - 'border-bottom-right-radius', - 'border-bottom-left-radius' - ], { - breakUp: breakUp.borderRadius, - putTogether: putTogether.borderRadius - }); - - addFourValueShorthand('-moz-border-radius', [ - '-moz-border-top-left-radius', - '-moz-border-top-right-radius', - '-moz-border-bottom-right-radius', - '-moz-border-bottom-left-radius' - ], { - breakUp: breakUp.borderRadius, - putTogether: putTogether.borderRadius - }); - - addFourValueShorthand('-webkit-border-radius', [ - '-webkit-border-top-left-radius', - '-webkit-border-top-right-radius', - '-webkit-border-bottom-right-radius', - '-webkit-border-bottom-left-radius' - ], { - breakUp: breakUp.borderRadius, - putTogether: putTogether.borderRadius - }); - - addFourValueShorthand('-o-border-radius', [ - '-o-border-top-left-radius', - '-o-border-top-right-radius', - '-o-border-bottom-right-radius', - '-o-border-bottom-left-radius' - ], { - breakUp: breakUp.borderRadius, - putTogether: putTogether.borderRadius + ['', '-moz-', '-o-', '-webkit-'].forEach(function (prefix) { + addFourValueShorthand(prefix + 'border-radius', [ + prefix + 'border-top-left-radius', + prefix + 'border-top-right-radius', + prefix + 'border-bottom-right-radius', + prefix + 'border-bottom-left-radius' + ], { + breakUp: breakUp.borderRadius, + putTogether: putTogether.borderRadius + }); }); addFourValueShorthand('border-color', [