Bug 1761926 - Make sure not to fall back to native theme colors for checkbox borders in custom themes. r=mconley

The issue is that when a custom theme is used, `--input-border-color`
may or may not be set (depending on the theme), and when it's not set
we'd fall back to the native colors for checkbox borders, but not for
checkbox backgrounds (which use --button-bgcolor, which is always set),
causing poor contrast depending on the theme.

Differential Revision: https://phabricator.services.mozilla.com/D142321
This commit is contained in:
Emilio Cobos Álvarez 2022-03-30 18:56:15 +00:00
parent 7e23a4287f
commit 52b9b4e4be

View File

@ -52,7 +52,6 @@
--buttons-destructive-active-bgcolor: #810220;
--buttons-destructive-color: #fbfbfe;
--checkbox-border-color: var(--input-border-color);
--checkbox-unchecked-bgcolor: var(--button-bgcolor);
--checkbox-unchecked-hover-bgcolor: var(--button-hover-bgcolor);
--checkbox-unchecked-active-bgcolor: var(--button-active-bgcolor);
@ -88,6 +87,10 @@
--ext-theme-background-transition: background-color 0.1s cubic-bezier(.17,.67,.83,.67);
}
:root:-moz-lwtheme {
--checkbox-border-color: color-mix(in srgb, currentColor 41%, transparent);
}
@media (prefers-contrast) {
:root {
--autocomplete-popup-separator-color: color-mix(in srgb, currentColor 86%, transparent);