Bug 1393415 - Highlight help icon in high contrast theme. r=jaws, a=ritu
authorRicky Chien <ricky060709@gmail.com>
Mon, 02 Oct 2017 18:23:48 +0800
changeset 677889 ecf9a5a692354b23e9d5d5fa1e607b8bbac207ed
parent 677888 701860612ef43c21cedc713ce604e67ba05d8296
child 677890 3d3e597d3b96eca3163c70ff0d2a263e2d7e9cf5
push id83805
push userbmo:rail@mozilla.com
push dateTue, 10 Oct 2017 19:01:30 +0000
reviewersjaws, ritu
bugs1393415
milestone57.0
Bug 1393415 - Highlight help icon in high contrast theme. r=jaws, a=ritu MozReview-Commit-ID: ByEZKJzhIUM
browser/components/preferences/in-content/preferences.xul
browser/themes/shared/incontentprefs/preferences.inc.css
toolkit/themes/shared/in-content/common.inc.css
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -170,17 +170,20 @@
         <label class="category-name" flex="1">&paneSync1.title;</label>
       </richlistitem>
     </richlistbox>
 
     <keyset>
       <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand="gSearchResultsPane.searchInput.focus();"/>
     </keyset>
 
-    <html:a class="help-button" target="_blank" aria-label="&helpButton2.label;">&helpButton2.label;</html:a>
+    <html:a class="help-button" target="_blank" aria-label="&helpButton2.label;">
+      <html:img class="help-icon" src="chrome://global/skin/icons/help.svg"/>
+      <html:span class="help-label">&helpButton2.label;</html:span>
+    </html:a>
 
     <vbox class="main-content" flex="1" align="start">
       <vbox class="pane-container">
         <hbox class="search-container" pack="end">
           <textbox type="search" id="searchInput" style="width: &searchField.width;" hidden="true" clickSelectsAll="true"/>
         </hbox>
         <prefpane id="mainPrefPane">
 #include searchResults.xul
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -605,26 +605,24 @@ button > hbox > label {
 }
 
 .help-button {
   display: flex;
   align-items: center;
   position: fixed;
   left: 0;
   bottom: 36px;
-  background-image: url("chrome://global/skin/icons/help.svg");
+  background-image: none;
   -moz-context-properties: fill, fill-opacity;
   fill: currentColor;
   line-height: 22px;
   height: unset;
   min-height: 36px;
   width: 168px;
-  background-position: left 10px center;
-  background-size: 16px;
-  padding-inline-start: 38px;
+  padding-inline-start: 18px;
   margin-inline-start: 34px;
 }
 
 .help-button:-moz-locale-dir(rtl) {
   background-position: right 10px top 10px;
   left: auto;
   right: 0;
 }
@@ -635,16 +633,38 @@ button > hbox > label {
 
 .help-button:link,
 .help-button:visited {
   color: var(--in-content-category-text);
   text-decoration: none;
   border-radius: 2px;
 }
 
+.help-icon {
+  width: 16px;
+  height: 16px;
+}
+
+.help-label {
+  margin: 0 14px;
+}
+
+@media (max-width: 830px) {
+  .help-button {
+    width: 36px;
+    padding: 0;
+    justify-content: center;
+    margin-inline-start: 40px;
+  }
+
+  .help-label {
+    display: none;
+  }
+}
+
 .face-sad {
   list-style-image: url("chrome://browser/skin/preferences/in-content/face-sad.svg");
   width: 20px;
   height: 20px;
   margin-inline-end: 8px;
   margin-top: 5px;
   margin-bottom: 5px;
 }
--- a/toolkit/themes/shared/in-content/common.inc.css
+++ b/toolkit/themes/shared/in-content/common.inc.css
@@ -687,17 +687,16 @@ xul|*.radio-label-box {
 *|*.category[selected]:hover:active,
 *|*.category.selected:hover:active {
   color: var(--in-content-category-text-selected-active);
   background-color: var(--in-content-category-background-selected-active);
 }
 
 *|*#categories[keyboard-navigation="true"]:-moz-focusring > *|*.category[current] {
   border: var(--in-content-category-border-focus);
-  border-inline-start: none;
 }
 
 *|*.category-name {
   line-height: 22px;
   padding-bottom: 2px;
   padding-inline-start: 9px;
   margin: 0;
   -moz-user-select: none;
@@ -724,24 +723,16 @@ xul|*.radio-label-box {
     display: none;
   }
 
   .category {
     padding-inline-start: 13px; /* make category icons align center */
     margin-inline-end: 35px;
   }
 
-  .help-button {
-    font-size: 0 !important;
-    margin-inline-start: 41px !important; /* make the question mark icon align center */
-    background-position: 10px !important;
-    padding-inline-start: 0px !important;
-    width: 36px !important;
-  }
-
   .main-content {
     padding-left: 0;
     padding-right: 0;
   }
 
   .pane-container {
     margin-inline-end: 10px;
   }