Skip to content

Commit a4e3e20

Browse files
committed
fix: rename and export color-contrast-variables used in _variables.scss
1 parent 958929f commit a4e3e20

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

scss/_functions.scss

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@forward "functions/assert-starts-at-zero";
33
@forward "functions/color";
44
@forward "functions/color-contrast";
5+
@forward "functions/color-contrast-variables";
56
@forward "functions/contrast-ratio";
67
@forward "functions/escape-svg";
78
@forward "functions/maps";

scss/_variables.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ $btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;
896896
$btn-link-color: var(--#{$prefix}link-color) !default;
897897
$btn-link-hover-color: var(--#{$prefix}link-hover-color) !default;
898898
$btn-link-disabled-color: $gray-600 !default;
899-
$btn-link-focus-shadow-rgb: to-rgb(color.mix(color-contrast($link-color, $color-contrast-dark, $color-contrast-light, $white, $black, $min-contrast-ratio), $link-color, 15%)) !default;
899+
$btn-link-focus-shadow-rgb: to-rgb(color.mix(color-contrast-variables($link-color, $color-contrast-dark, $color-contrast-light, $white, $black, $min-contrast-ratio), $link-color, 15%)) !default;
900900

901901
// Allows for customizing button radius independently from global border radius
902902
$btn-border-radius: var(--#{$prefix}border-radius) !default;

scss/functions/_color-contrast-variables.scss

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
@use "contrast-ratio" as *;
22

3-
// Color contrast
4-
// See https://github.com/twbs/bootstrap/pull/30168
3+
// We use this function only in variables.scss because recursive imports are not allowed in Sass anymore.
54

6-
@function color-contrast($background, $color-contrast-dark, $color-contrast-light, $white, $black, $min-contrast-ratio) {
5+
@function color-contrast-variables($background, $color-contrast-dark, $color-contrast-light, $white, $black, $min-contrast-ratio) {
76
$foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
87
$max-ratio: 0;
98
$max-ratio-color: null;

0 commit comments

Comments
 (0)