Bug 1297788 - Move general autocomplete styles to autocomplete.inc.css. r=adw draft
authorTim Nguyen <ntim.bugs@gmail.com>
Tue, 21 Nov 2017 20:07:38 +0000
changeset 701496 6dc5319fdf541b98d452d93aab0e30e7e91544d5
parent 700247 ef82504a27826468cf9885b22380acefac277bda
child 701497 466a104ccdccfe57051860cde277dda7155d47b6
push id90186
push userbmo:ntim.bugs@gmail.com
push dateTue, 21 Nov 2017 20:09:27 +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;
-}
-