Skip to content

Commit 35f5253

Browse files
committed
fix: color-contrast() function for WCAG 2.1 compliance
1 parent 356fdbd commit 35f5253

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scss/functions/_color-contrast-variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
@each $color in $foregrounds {
1111
$contrast-ratio: contrast-ratio($background, $color);
12-
@if $contrast-ratio > $min-contrast-ratio {
12+
@if $contrast-ratio >= $min-contrast-ratio {
1313
@return $color;
1414
} @else if $contrast-ratio > $max-ratio {
1515
$max-ratio: $contrast-ratio;

scss/functions/_color-contrast.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@each $color in $foregrounds {
1414
$contrast-ratio: contrast-ratio($background, $color);
15-
@if $contrast-ratio > $min-contrast-ratio {
15+
@if $contrast-ratio >= $min-contrast-ratio {
1616
@return $color;
1717
} @else if $contrast-ratio > $max-ratio {
1818
$max-ratio: $contrast-ratio;

0 commit comments

Comments
 (0)