Bug 1348573 - Fix button text color in focused / active / checked states with High Contrast black and High Contrast white themes. r?gijs
MozReview-Commit-ID: BwEnPur1AJ5
--- a/toolkit/themes/windows/global/button.css
+++ b/toolkit/themes/windows/global/button.css
@@ -32,23 +32,27 @@ button {
}
/* .......... focused state .......... */
button:-moz-focusring > .button-box {
border: 1px dotted ThreeDDarkShadow;
}
-/* .......... default state .......... */
+/* .......... default/hover/focused state .......... */
@media (-moz-windows-default-theme: 0) {
@media (-moz-windows-compositor) {
- /* This is for high-contrast themes on Windows 8 and later */
- button[default="true"],
- button:hover {
+ /* This is for high-contrast black and white themes on Windows 8 and later,
+ where the native appearance renders a different background (which
+ appears to be equivalent to the Highlight color) if the button is in the
+ default, hovered or focused state. However, if these states overlap with
+ the active, disabled, open or checked state, the appearance reverts back
+ to the default background. */
+ button:-moz-any([default="true"],:hover,:focus):not(:-moz-any(:active,[disabled="true"],[open="true"],[checked="true"])) {
color: HighlightText;
}
}
}
/* .......... active/open/checked state .......... */
button:hover:active > .button-box:-moz-system-metric(windows-classic),