]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Modified tolerance to be able to customize.
authorkoki-higashikawa <koki.higashikawa@crowdworks.co.jp>
Sat, 4 Feb 2017 06:52:21 +0000 (15:52 +0900)
committerkoki-higashikawa <koki.higashikawa@crowdworks.co.jp>
Sat, 4 Feb 2017 06:52:21 +0000 (15:52 +0900)
scss/_global.scss
scss/util/_color.scss

index 72dc375b8f6e78af6725cec32f3a1b591f9a21b6..91803de32d63b1a58fb6106b3157074c151bbc11 100644 (file)
@@ -102,6 +102,10 @@ $global-flexbox: false !default;
 $global-left: if($global-text-direction == rtl, right, left);
 $global-right: if($global-text-direction == rtl, left, right);
 
+/// Global tolerance for color pick contrast.
+/// @type Number
+$global-color-pick-contrast-tolerance: 0 !default;
+
 // Internal variables used for colors
 $primary-color: get-color(primary);
 $secondary-color: get-color(secondary);
index 66fa9e71c2905db07b8fcb30b719b169e5f0d3a0..a7e4aa339fdb06b015d1694e4194cfeb16597b64 100644 (file)
@@ -59,7 +59,7 @@
 /// @param {Color} $color2 - Second color to compare.
 ///
 /// @returns {Number} The contrast ratio of the compared colors.
-@function color-pick-contrast($base, $colors: ($white, $black), $tolerance: 0) {
+@function color-pick-contrast($base, $colors: ($white, $black), $tolerance: $global-color-pick-contrast-tolerance) {
   $contrast: color-contrast($base, nth($colors, 1));
   $best: nth($colors, 1);