From acf7ca9a6898aeb9e8c0f99ccc44a84a28d206da Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Fri, 3 May 2019 20:18:42 +0200 Subject: [PATCH] More compact color-yiq function (#28514) --- scss/_functions.scss | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scss/_functions.scss b/scss/_functions.scss index 41e99ec761..e867b55211 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -56,11 +56,7 @@ $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; - @if ($yiq >= $yiq-contrasted-threshold) { - @return $dark; - } @else { - @return $light; - } + @return if($yiq >= $yiq-contrasted-threshold, $dark, $light); } // Retrieve color Sass maps