Skip to content

Commit 97fff26

Browse files
committed
Fix Caps-lock-is-on color in light theme
When a Polkit dialog is open to ask for the password, if the user activates the Caps Lock, a message appears under the text entry notifying that it is active, to warn the user. In dark theme, this message is painted in yellow, which is fine because it gives a good contrast against the background; but in litht theme, a slightly darker yellow is used, which has poor contrast. This goes against the accessibility (A11Y) requirements of having, at least, a 4.5/1 contrast ratio in text. This patch fixes this by setting the WARNING text color to black.
1 parent e3fbea2 commit 97fff26

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

gnome-shell/src/gnome-shell-sass/_default-colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $success_bg_color: if($variant == 'light', $green_4, $green_5);
1717
$success_fg_color: $light_1;
1818
$success_color: $success_bg_color;
1919

20-
$warning_bg_color: if($variant == 'light', $yellow_5, #cd9309); // uses darker off-palette yellow
20+
$warning_bg_color: if($variant == 'light', black, #cd9309); // uses darker off-palette yellow
2121
$warning_fg_color: transparentize(black, .2);
2222
$warning_color: $warning_bg_color;
2323

gnome-shell/src/gnome-shell-sass/_yaru-default-colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ $_base_color_light: $light_1; // Yaru: use our colors
66
$yaru_borders_color_dark: lighten(desaturate(lighten($jet, 4%), 100%), 14%);
77

88
// Overrides default
9-
$warning_bg_color: if($variant =='light', darken($yellow, 1%), $yellow);
9+
$warning_bg_color: if($variant =='light', black, $yellow);

gnome-shell/upstream/theme/gnome-shell-sass/_default-colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $success_bg_color: if($variant == 'light', $green_4, $green_5);
1717
$success_fg_color: $light_1;
1818
$success_color: $success_bg_color;
1919

20-
$warning_bg_color: if($variant == 'light', $yellow_5, #cd9309); // uses darker off-palette yellow
20+
$warning_bg_color: if($variant == 'light', black, #cd9309); // uses darker off-palette yellow
2121
$warning_fg_color: transparentize(black, .2);
2222
$warning_color: $warning_bg_color;
2323

0 commit comments

Comments
 (0)