aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/_functions.scss
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/scss/_functions.scss')
-rw-r--r--vendor/twbs/bootstrap/scss/_functions.scss14
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/twbs/bootstrap/scss/_functions.scss b/vendor/twbs/bootstrap/scss/_functions.scss
index bf8be9aee..d2cc91d57 100644
--- a/vendor/twbs/bootstrap/scss/_functions.scss
+++ b/vendor/twbs/bootstrap/scss/_functions.scss
@@ -8,7 +8,7 @@
$prev-key: null;
$prev-num: null;
@each $key, $num in $map {
- @if $prev-num == null {
+ @if $prev-num == null or unit($num) == "%" {
// Do nothing
} @else if not comparable($prev-num, $num) {
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
@@ -21,12 +21,12 @@
}
// Starts at zero
-// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
-@mixin _assert-starts-at-zero($map) {
+// Used to ensure the min-width of the lowest breakpoint starts at 0.
+@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
$values: map-values($map);
$first-value: nth($values, 1);
@if $first-value != 0 {
- @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
+ @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
}
}
@@ -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;
}
}