Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/JugglerX/hugo-whisper-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/scss/bootstrap/_functions.scss')
-rwxr-xr-xassets/scss/bootstrap/_functions.scss18
1 files changed, 9 insertions, 9 deletions
diff --git a/assets/scss/bootstrap/_functions.scss b/assets/scss/bootstrap/_functions.scss
index 1266d34..d2cc91d 100755
--- a/assets/scss/bootstrap/_functions.scss
+++ b/assets/scss/bootstrap/_functions.scss
@@ -1,6 +1,6 @@
// Bootstrap functions
//
-// Utility mixins and functions for evalutating source code across our variables, maps, and mixins.
+// Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
// Ascending
// Used to evaluate Sass maps like our grid breakpoints.
@@ -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;
}
}
@@ -79,7 +79,7 @@
// 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);
+ $color-base: if($level > 0, $black, $white);
$level: abs($level);
@return mix($color-base, $color, $level * $theme-color-interval);