mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Add checks to fix color contrast issues (#32085)
This commit is contained in:
@@ -151,7 +151,13 @@
|
||||
// Add modifier classes to change text and background color on individual items.
|
||||
// Organizationally, this must come after the `:hover` states.
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
@include list-group-item-variant($color, scale-color($value, $list-group-item-bg-scale), scale-color($value, $list-group-item-color-scale));
|
||||
@each $state, $value in $theme-colors {
|
||||
$background: scale-color($value, $list-group-item-bg-scale);
|
||||
$color: scale-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));
|
||||
}
|
||||
|
||||
@include list-group-item-variant($state, $background, $color);
|
||||
}
|
||||
// scss-docs-end list-group-modifiers
|
||||
|
Reference in New Issue
Block a user