Bug 1674000 - Use better colors for the search mode indicator in Windows high-contrast themes. r=ntim, a=jcristau
authorDrew Willcoxon <adw@mozilla.com>
Thu, 29 Oct 2020 02:11:45 +0000
changeset 619396 78ed61534c35fd42ae06ea59ea79df067cc0a4f3
parent 619395 e9a88fca37432cf36d36713a94d69d029591cc29
child 619397 aba61153a3570188bb88ae6c01e11f15314c0513
push id14454
push userjcristau@mozilla.com
push dateFri, 30 Oct 2020 14:00:15 +0000
treeherdermozilla-beta@7b3b0961c32b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersntim, jcristau
bugs1674000
milestone83.0
Bug 1674000 - Use better colors for the search mode indicator in Windows high-contrast themes. r=ntim, a=jcristau Here's what this looks like in all of Windows 10's high-contrast themes. I tried keeping the border the same color as the text but I don't think it looked good, so I made it the same color as the background. {F2546521} Differential Revision: https://phabricator.services.mozilla.com/D95095
browser/themes/shared/urlbar-searchbar.inc.css
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -328,16 +328,34 @@
   fill: var(--lwt-toolbar-field-focus-color);
   background-color: var(--lwt-toolbar-field-focus);
 }
 
 #urlbar-search-mode-indicator:hover  > #urlbar-search-mode-indicator-close {
   display: inline;
 }
 
+/* Windows high-contrast themes */
+%ifdef XP_WIN
+@media (-moz-windows-default-theme: 0) {
+  #urlbar-search-mode-indicator {
+    background-color: Highlight;
+    outline-color: Highlight;
+  }
+
+  #urlbar-search-mode-indicator-title {
+    color: HighlightText;
+  }
+
+  #urlbar-search-mode-indicator-close {
+    stroke-opacity: 1.0;
+  }
+}
+%endif
+
 @supports -moz-bool-pref("browser.urlbar.experimental.searchModeIndicatorHover") {
   #urlbar-search-mode-indicator-close:hover {
     background-color: #ededf0; /* Grey 20 */
   }
   #urlbar-search-mode-indicator-close:hover:active {
     background-color: #d7d7db; /* Grey 30 */
   }