2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Fix color-contrast() function for WCAG 2.1 compliance (#41585)

This commit is contained in:
Julien Déramond
2025-07-02 22:30:30 +02:00
committed by GitHub
parent 64b340c37f
commit b02d5ed72f
2 changed files with 140 additions and 1 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
@each $color in $foregrounds {
$contrast-ratio: contrast-ratio($background, $color);
@if $contrast-ratio > $min-contrast-ratio {
@if $contrast-ratio >= $min-contrast-ratio {
@return $color;
} @else if $contrast-ratio > $max-ratio {
$max-ratio: $contrast-ratio;