Skip to content

Commit

Permalink
More compact color-yiq function
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens committed Mar 16, 2019
1 parent a88d586 commit 44b2d91
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scss/_functions.scss
Expand Up @@ -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
Expand Down

0 comments on commit 44b2d91

Please sign in to comment.