aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2017-10-18 21:06:13 -0700
committerMark Otto <[email protected]>2017-10-22 12:56:06 -0700
commitbf2fee90356ba1be2ed739d9350b229c9e78064c (patch)
treea9ab1f00b3d9b7cd20a3250ccfae9fb5093a56aa
parent0a82cd9f3c44904d931614dba267295231e85f90 (diff)
downloadbootstrap-bf2fee90356ba1be2ed739d9350b229c9e78064c.tar.xz
bootstrap-bf2fee90356ba1be2ed739d9350b229c9e78064c.zip
add vars for yiq color contrast function
-rw-r--r--scss/_functions.scss4
-rw-r--r--scss/_variables.scss4
2 files changed, 6 insertions, 2 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index 43210f7fb..a95ad4375 100644
--- a/scss/_functions.scss
+++ b/scss/_functions.scss
@@ -57,9 +57,9 @@
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= 150) {
- @return #111;
+ @return $yiq-text-dark;
} @else {
- @return #fff;
+ @return $yiq-text-light;
}
}
diff --git a/scss/_variables.scss b/scss/_variables.scss
index bfe3feaae..993546fe7 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -87,6 +87,10 @@ $theme-colors: map-merge((
// Set a specific jump point for requesting color jumps
$theme-color-interval: 8% !default;
+// Customize the light and dark text colors for use in our YIQ color contrast function.
+$yiq-text-dark: #111 !default;
+$yiq-text-light: #fff !default;
+
// Options
//