Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: variables collide with globals #32492

Merged
merged 3 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scss/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
// Generate contextual modifier classes for colorizing the alert.

@each $state, $value in $theme-colors {
$background: shift-color($value, $alert-bg-scale);
$border: shift-color($value, $alert-border-scale);
$color: shift-color($value, $alert-color-scale);
@if (contrast-ratio($background, $color) < $min-contrast-ratio) {
$color: mix($value, color-contrast($background), abs($alert-color-scale));
$alert-background: shift-color($value, $alert-bg-scale);
$alert-border: shift-color($value, $alert-border-scale);
$alert-color: shift-color($value, $alert-color-scale);
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
}
.alert-#{$state} {
@include alert-variant($background, $border, $color);
@include alert-variant($alert-background, $alert-border, $alert-color);
}
}
// scss-docs-end alert-modifiers
10 changes: 5 additions & 5 deletions scss/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@
// Organizationally, this must come after the `:hover` states.

@each $state, $value in $theme-colors {
$background: shift-color($value, $list-group-item-bg-scale);
$color: shift-color($value, $list-group-item-color-scale);
@if (contrast-ratio($background, $color) < $min-contrast-ratio) {
$color: mix($value, color-contrast($background), abs($alert-color-scale));
$list-group-background: shift-color($value, $list-group-item-bg-scale);
$list-group-color: shift-color($value, $list-group-item-color-scale);
@if (contrast-ratio($list-group-background, $list-group-color) < $min-contrast-ratio) {
$list-group-color: mix($value, color-contrast($list-group-background), abs($alert-color-scale));
}

@include list-group-item-variant($state, $background, $color);
@include list-group-item-variant($state, $list-group-background, $list-group-color);
}
// scss-docs-end list-group-modifiers