1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 11:21:23 +02:00

feature/yiq function, add parameters, with default values. (#26917)

This commit is contained in:
Andrey
2018-10-21 10:33:53 +03:00
committed by XhmikosR
parent e2014e8ed7
commit 3075432584

View File

@@ -49,7 +49,7 @@
} }
// Color contrast // Color contrast
@function color-yiq($color) { @function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
$r: red($color); $r: red($color);
$g: green($color); $g: green($color);
$b: blue($color); $b: blue($color);
@@ -57,9 +57,9 @@
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000; $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= $yiq-contrasted-threshold) { @if ($yiq >= $yiq-contrasted-threshold) {
@return $yiq-text-dark; @return $dark;
} @else { } @else {
@return $yiq-text-light; @return $light;
} }
} }