]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
More compact color-yiq function (#28514)
authorMartijn Cuppens <martijn.cuppens@gmail.com>
Fri, 3 May 2019 18:18:42 +0000 (20:18 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 3 May 2019 18:18:41 +0000 (21:18 +0300)
scss/_functions.scss

index 41e99ec7615a397f4a1b3b40abbb19301511d0b8..e867b5521199d20cc3d5398624220d08c2bf3200 100644 (file)
 
   $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