From 88444ec1ef03a55d1137d261199a59d982263c80 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowicz Date: Sun, 29 Jun 2014 21:57:12 +0100 Subject: [PATCH] Shortens `border-radius` addFourValueShorthand calls. --- lib/properties/processable.js | 48 ++++++++--------------------------- 1 file changed, 10 insertions(+), 38 deletions(-) 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', [ -- 2.34.1