aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey <[email protected]>2018-10-21 10:33:53 +0300
committerXhmikosR <[email protected]>2018-10-21 10:33:53 +0300
commit3075432584c974aadf6786a5d9bda80b02582589 (patch)
treeb16c156cf743c3875161484135d8f8772d93624f
parente2014e8ed71a0c68a5cc436b0393486d0945fafe (diff)
downloadbootstrap-3075432584c974aadf6786a5d9bda80b02582589.tar.xz
bootstrap-3075432584c974aadf6786a5d9bda80b02582589.zip
feature/yiq function, add parameters, with default values. (#26917)
-rw-r--r--scss/_functions.scss6
1 files changed, 3 insertions, 3 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index ab2fd0ba3..77b8c8f10 100644
--- a/scss/_functions.scss
+++ b/scss/_functions.scss
@@ -49,7 +49,7 @@
}
// Color contrast
-@function color-yiq($color) {
+@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
$r: red($color);
$g: green($color);
$b: blue($color);
@@ -57,9 +57,9 @@
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= $yiq-contrasted-threshold) {
- @return $yiq-text-dark;
+ @return $dark;
} @else {
- @return $yiq-text-light;
+ @return $light;
}
}