mod/bootstrap/vendor/bootstrap/scss/_functions.scss in card-1.93.2 vs mod/bootstrap/vendor/bootstrap/scss/_functions.scss in card-1.93.3
- old
+ new
@@ -47,21 +47,21 @@
@return $string;
}
// Color contrast
-@mixin color-yiq($color) {
+@function color-yiq($color) {
$r: red($color);
$g: green($color);
$b: blue($color);
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
@if ($yiq >= 150) {
- color: #111;
+ @return #111;
} @else {
- color: #fff;
+ @return #fff;
}
}
// Retreive color Sass maps
@function color($key: "blue") {
@@ -70,21 +70,17 @@
@function theme-color($key: "primary") {
@return map-get($theme-colors, $key);
}
-@function grayscale($key: "100") {
+@function gray($key: "100") {
@return map-get($grays, $key);
}
// Request a theme color level
@function theme-color-level($color-name: "primary", $level: 0) {
$color: theme-color($color-name);
$color-base: if($level > 0, #000, #fff);
+ $level: abs($level);
- @if $level < 0 {
- // Lighter values need a quick double negative for the Sass math to work
- @return mix($color-base, $color, $level * -1 * $theme-color-interval);
- } @else {
- @return mix($color-base, $color, $level * $theme-color-interval);
- }
+ @return mix($color-base, $color, $level * $theme-color-interval);
}