Bug 1297788 - Move general autocomplete styles to autocomplete.inc.css. r=adw
authorTim Nguyen <ntim.bugs@gmail.com>
Tue, 21 Nov 2017 20:07:38 +0000
changeset 701817 83a3d32d81e065995da575836d9581e5bb396ec6
parent 701816 f515ace4d2da7cdd73c6d915189f890284da2778
child 701818 c8d3ad173dbcc225b69ec710bce5b5bec6b13955
push id90298
push userbmo:bpostelnicu@mozilla.com
push dateWed, 22 Nov 2017 10:54:01 +0000
reviewersadw
bugs1297788
milestone59.0a1
Bug 1297788 - Move general autocomplete styles to autocomplete.inc.css. r=adw MozReview-Commit-ID: BEhPJs3IrP8
browser/themes/shared/autocomplete.inc.css
browser/themes/shared/urlbar-autocomplete.inc.css
--- a/browser/themes/shared/autocomplete.inc.css
+++ b/browser/themes/shared/autocomplete.inc.css
@@ -1,14 +1,16 @@
 %if 0
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 %endif
 
+/* General popup rules */
+
 #PopupAutoComplete > richlistbox > richlistitem {
   height: 20px;
   min-height: 20px;
   border: 0;
   border-radius: 0;
   padding: 0px 1px 0px 1px;
 }
 
@@ -21,16 +23,28 @@
   font: icon;
   margin-inline-start: 4px;
 }
 
 #PopupAutoComplete > richlistbox {
   padding: 0;
 }
 
+/* Popup states */
+
+.autocomplete-richlistitem:hover,
+treechildren.searchbar-treebody::-moz-tree-row(hover) {
+  background-color: var(--arrowpanel-dimmed);
+}
+
+.autocomplete-richlistitem[selected],
+treechildren.searchbar-treebody::-moz-tree-row(selected) {
+  background-color: Highlight;
+  color: HighlightText;
+}
 
 /* Login form autocompletion */
 #PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon {
   display: initial;
   list-style-image: url(chrome://browser/skin/notification-icons/login.svg);
   -moz-context-properties: fill;
   fill: GrayText;
 }
--- a/browser/themes/shared/urlbar-autocomplete.inc.css
+++ b/browser/themes/shared/urlbar-autocomplete.inc.css
@@ -3,39 +3,27 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 %endif
 
 #treecolAutoCompleteImage {
   max-width: 36px;
 }
 
-.autocomplete-richlistbox {
+#PopupAutoCompleteRichResult .autocomplete-richlistbox {
   padding: 4px 3px;
 }
 
-.autocomplete-richlistitem {
+#PopupAutoCompleteRichResult .autocomplete-richlistitem {
   min-height: 30px;
   font: message-box;
   border-radius: 2px;
   padding-inline-start: var(--item-padding-start);
   /* For the space after the autocomplete text we have to use a transparent
      border instead of padding, because the latter would considered part of the
      scrollable area when generating the overflow events that we use to
      constrain the autocomplete result item size. */
   border-inline-end: var(--item-padding-end) solid transparent;
 }
 
-:root[uidensity=touch] .autocomplete-richlistitem {
+:root[uidensity=touch] #PopupAutoCompleteRichResult .autocomplete-richlistitem {
   min-height: 40px;
 }
-
-.autocomplete-richlistitem:hover,
-treechildren.searchbar-treebody::-moz-tree-row(hover) {
-  background-color: var(--arrowpanel-dimmed);
-}
-
-.autocomplete-richlistitem[selected],
-treechildren.searchbar-treebody::-moz-tree-row(selected) {
-  background-color: Highlight;
-  color: HighlightText;
-}
-