]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add vars for yiq color contrast function
authorMark Otto <markdotto@gmail.com>
Thu, 19 Oct 2017 04:06:13 +0000 (21:06 -0700)
committerMark Otto <markd.otto@gmail.com>
Sun, 22 Oct 2017 19:56:06 +0000 (12:56 -0700)
scss/_functions.scss
scss/_variables.scss

index 43210f7fb3bd694cd69aa540efea830bad598a33..a95ad4375f5bdca571e8480f176e45b8a70bc783 100644 (file)
@@ -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;
   }
 }
 
index bfe3feaae1604462bd3b68e33c99b4ee06975170..993546fe7c58736ebbe3406f3066ae25dc4ad823 100644 (file)
@@ -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
 //