Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a4e3e20

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

File tree

Expand file treeCollapse file tree

3 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-4
lines changed

‎scss/_functions.scss

Copy file name to clipboardExpand all lines: scss/_functions.scss
+1Lines changed: 1 addition & 0 deletions
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

Copy file name to clipboardExpand all lines: scss/_variables.scss
+1-1Lines changed: 1 addition & 1 deletion
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

Copy file name to clipboardExpand all lines: scss/functions/_color-contrast-variables.scss
+2-3Lines changed: 2 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.